summarylogtreecommitdiffstats
path: root/add_extern.patch
blob: 1c55cad3b807575264064e98732f6b4d80a75ade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
diff --unified --recursive --text a/source/common.h source/common.h
--- a/source/common.h	2020-12-18 15:50:52.000000000 +0100
+++ source/common.h	2020-12-18 15:37:45.000000000 +0100
@@ -30,15 +30,15 @@
 #define I2C          42
 #define PWM          43
 
-int gpio_mode;
-const int pin_to_gpio_rev1[41];
-const int pin_to_gpio_rev2[41];
-const int pin_to_gpio_rev3[41];
-const int pin_to_gpio_nanopi[64];
-const int (*pin_to_gpio)[41];
-int gpio_direction[54];
-rpi_info rpiinfo;
-int setup_error;
-int module_setup;
-int check_gpio_priv(void);
-int get_gpio_number(int channel, unsigned int *gpio);
+extern int gpio_mode;
+extern const int pin_to_gpio_rev1[41];
+extern const int pin_to_gpio_rev2[41];
+extern const int pin_to_gpio_rev3[41];
+extern const int pin_to_gpio_nanopi[64];
+extern const int (*pin_to_gpio)[41];
+extern int gpio_direction[54];
+extern rpi_info rpiinfo;
+extern int setup_error;
+extern int module_setup;
+extern int check_gpio_priv(void);
+extern int get_gpio_number(int channel, unsigned int *gpio);
diff --unified --recursive --text a/source/constants.h source/constants.h
--- a/source/constants.h	2020-12-18 15:50:52.000000000 +0100
+++ source/constants.h	2020-12-18 15:43:40.000000000 +0100
@@ -23,22 +23,22 @@
 #define PY_PUD_CONST_OFFSET 20
 #define PY_EVENT_CONST_OFFSET 30
 
-PyObject *high;
-PyObject *low;
-PyObject *input;
-PyObject *output;
-PyObject *pwm;
-PyObject *serial;
-PyObject *i2c;
-PyObject *spi;
-PyObject *unknown;
-PyObject *board;
-PyObject *bcm;
-PyObject *pud_off;
-PyObject *pud_up;
-PyObject *pud_down;
-PyObject *rising_edge;
-PyObject *falling_edge;
-PyObject *both_edge;
+extern PyObject *high;
+extern PyObject *low;
+extern PyObject *input;
+extern PyObject *output;
+extern PyObject *pwm;
+extern PyObject *serial;
+extern PyObject *i2c;
+extern PyObject *spi;
+extern PyObject *unknown;
+extern PyObject *board;
+extern PyObject *bcm;
+extern PyObject *pud_off;
+extern PyObject *pud_up;
+extern PyObject *pud_down;
+extern PyObject *rising_edge;
+extern PyObject *falling_edge;
+extern PyObject *both_edge;
 
 void define_constants(PyObject *module);
diff --unified --recursive --text a/source/cpuinfo.h source/cpuinfo.h
--- a/source/cpuinfo.h	2020-12-18 15:50:52.000000000 +0100
+++ source/cpuinfo.h	2020-12-18 15:38:42.000000000 +0100
@@ -33,4 +33,4 @@
 } rpi_info;
 #endif /* CPUINFO_H */
 
-int get_rpi_info(rpi_info *info);
+extern int get_rpi_info(rpi_info *info);
diff --unified --recursive --text a/source/py_pwm.h source/py_pwm.h
--- a/source/py_pwm.h	2020-12-18 15:50:52.000000000 +0100
+++ source/py_pwm.h	2020-12-18 15:44:36.000000000 +0100
@@ -20,5 +20,5 @@
 SOFTWARE.
 */
 
-PyTypeObject PWMType;
-PyTypeObject *PWM_init_PWMType(void);
+extern PyTypeObject PWMType;
+extern PyTypeObject *PWM_init_PWMType(void);
diff --unified --recursive --text a/source/soft_pwm.c source/soft_pwm.c
--- a/source/soft_pwm.c	2020-12-18 15:50:52.000000000 +0100
+++ source/soft_pwm.c	2020-12-18 15:47:29.000000000 +0100
@@ -25,7 +25,7 @@
 #include <time.h>
 #include "c_gpio.h"
 #include "soft_pwm.h"
-pthread_t threads;
+extern pthread_t threads;
 
 struct pwm
 {