diff options
-rw-r--r-- | recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch | 33 | ||||
-rw-r--r-- | recipes-devtools/python/rpi-gpio_0.7.0.bb (renamed from recipes-devtools/python/rpi-gpio_0.6.3.bb) | 8 |
2 files changed, 6 insertions, 35 deletions
diff --git a/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch b/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch index bd97179..5c94bc2 100644 --- a/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch +++ b/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch | |||
@@ -30,6 +30,8 @@ silence this warning | |||
30 | uint32_t peri_base; | 30 | uint32_t peri_base; |
31 | 31 | ||
32 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 32 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
33 | [Pierre-Jean: update for version 0.7.0] | ||
34 | Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io> | ||
33 | --- | 35 | --- |
34 | Upstream-Status: Submitted | 36 | Upstream-Status: Submitted |
35 | 37 | ||
@@ -37,37 +39,6 @@ Upstream-Status: Submitted | |||
37 | source/py_gpio.c | 135 ++++++++++++++++++++++++++++--------------------------- | 39 | source/py_gpio.c | 135 ++++++++++++++++++++++++++++--------------------------- |
38 | 2 files changed, 71 insertions(+), 70 deletions(-) | 40 | 2 files changed, 71 insertions(+), 70 deletions(-) |
39 | 41 | ||
40 | diff --git a/source/c_gpio.c b/source/c_gpio.c | ||
41 | index c96a2b0..b69880f 100644 | ||
42 | --- a/source/c_gpio.c | ||
43 | +++ b/source/c_gpio.c | ||
44 | @@ -61,7 +61,7 @@ int setup(void) | ||
45 | { | ||
46 | int mem_fd; | ||
47 | uint8_t *gpio_mem; | ||
48 | - uint32_t peri_base; | ||
49 | + uint32_t peri_base = 0; | ||
50 | uint32_t gpio_base; | ||
51 | unsigned char buf[4]; | ||
52 | FILE *fp; | ||
53 | @@ -73,7 +73,7 @@ int setup(void) | ||
54 | if ((mem_fd = open("/dev/gpiomem", O_RDWR|O_SYNC)) > 0) | ||
55 | { | ||
56 | gpio_map = (uint32_t *)mmap(NULL, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, mem_fd, 0); | ||
57 | - if ((uint32_t)gpio_map < 0) { | ||
58 | + if (gpio_map == MAP_FAILED) { | ||
59 | return SETUP_MMAP_FAIL; | ||
60 | } else { | ||
61 | return SETUP_OK; | ||
62 | @@ -127,7 +127,7 @@ int setup(void) | ||
63 | |||
64 | gpio_map = (uint32_t *)mmap( (void *)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, gpio_base); | ||
65 | |||
66 | - if ((uint32_t)gpio_map < 0) | ||
67 | + if (gpio_map == MAP_FAILED) | ||
68 | return SETUP_MMAP_FAIL; | ||
69 | |||
70 | return SETUP_OK; | ||
71 | diff --git a/source/py_gpio.c b/source/py_gpio.c | 42 | diff --git a/source/py_gpio.c b/source/py_gpio.c |
72 | index d54cc7f..007bad5 100644 | 43 | index d54cc7f..007bad5 100644 |
73 | --- a/source/py_gpio.c | 44 | --- a/source/py_gpio.c |
diff --git a/recipes-devtools/python/rpi-gpio_0.6.3.bb b/recipes-devtools/python/rpi-gpio_0.7.0.bb index d0ff00a..fcce88f 100644 --- a/recipes-devtools/python/rpi-gpio_0.6.3.bb +++ b/recipes-devtools/python/rpi-gpio_0.7.0.bb | |||
@@ -1,14 +1,14 @@ | |||
1 | DESCRIPTION = "A module to control Raspberry Pi GPIO channels" | 1 | DESCRIPTION = "A module to control Raspberry Pi GPIO channels" |
2 | HOMEPAGE = "http://code.google.com/p/raspberry-gpio-python/" | 2 | HOMEPAGE = "https://sourceforge.net/projects/raspberry-gpio-python/" |
3 | SECTION = "devel/python" | 3 | SECTION = "devel/python" |
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=9b95630a648966b142f1a0dcea001cb7" | 5 | LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=9b95630a648966b142f1a0dcea001cb7" |
6 | 6 | ||
7 | PYPI_PACKAGE = "RPi.GPIO" | 7 | PYPI_PACKAGE = "RPi.GPIO" |
8 | inherit pypi distutils | 8 | inherit pypi distutils3 |
9 | 9 | ||
10 | SRC_URI += "file://0001-Remove-nested-functions.patch" | 10 | SRC_URI += "file://0001-Remove-nested-functions.patch" |
11 | SRC_URI[md5sum] = "e4abe1cfb5eacebe53078032256eb837" | 11 | SRC_URI[md5sum] = "777617f9dea9a1680f9af43db0cf150e" |
12 | SRC_URI[sha256sum] = "a5fc0eb5e401963b6c0a03650da6b42c4005f02d962b81241d96c98d0a578516" | 12 | SRC_URI[sha256sum] = "7424bc6c205466764f30f666c18187a0824077daf20b295c42f08aea2cb87d3f" |
13 | 13 | ||
14 | COMPATIBLE_MACHINE = "^rpi$" | 14 | COMPATIBLE_MACHINE = "^rpi$" |