diff options
| author | Pierre-Jean Texier <pjtexier@koncepto.io> | 2019-12-24 11:41:01 +0000 |
|---|---|---|
| committer | Andrei Gherzan <andrei@gherzan.ro> | 2019-12-31 13:12:48 +0000 |
| commit | e57d33298c7ce15aee476380f8afd37a0c352a17 (patch) | |
| tree | d0cc69a373266b7bf0b01fe2b1fd076dea0ba7c3 /recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch | |
| parent | d059288fa09ce072eade66efcb574db7831d3493 (diff) | |
| download | meta-raspberrypi-e57d33298c7ce15aee476380f8afd37a0c352a17.tar.gz | |
rpi-gpio: bump to version 0.7.0
Also:
- update the HOMEPAGE location
- refresh patch
- use 'distutils3' to support python3 -> python2 is now deprecated
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Diffstat (limited to 'recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch')
| -rw-r--r-- | recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch | 33 |
1 files changed, 2 insertions, 31 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 |
