Skip to content

Commit 4da0812

Browse files
committed
Fixing issue where using alt name for the XIO would cause a segfault when speficying the pin as an input. This will close #62
1 parent dcd8ea6 commit 4da0812

File tree

7 files changed

+19
-8
lines changed

7 files changed

+19
-8
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.5.5
2+
---
3+
* Fix for Issue #62 where using alternate name of an XIO would cause a segfault due to trying to set pull up/down resistor setting
4+
15
0.5.4
26
---
37
* Re-enabled the polarity setting for PWM based upon Issue #61

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ clean:
1515
rm -f *.pyo *.pyc
1616
rm -f *.egg
1717
rm -rf __pycache__
18+
rm -rf test/__pycache__/
1819
rm -rf debian/python-chip-io*
1920
rm -rf debian/python3-chip-io*
2021

debian/changelog

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
chip-io (0.5.5-1) unstable; urgency=low
2+
3+
* Fix for Issue #62 where using alternate name of an XIO would cause a segfault due to trying to set pull up/down resistor setting
4+
5+
-- Robert Wolterman <[email protected]> Mon, 6 Mar 2017 17:02:00 -0600
6+
17
chip-io (0.5.4-1) unstable; urgency=low
28

39
* Re-enabled the polarity setting for PWM based upon Issue #61
410
* Fixed a 1 letter bug was trying to write inverted to polarity when it wants inversed (such facepalm)
511
* Cleaned up the polarity setting code to work when PWM is not enabled
612
* Fixed the unit test for pwm to verify we can set polarity
713

8-
-- Robert Wolterman <[email protected]> Sun, 26 Feb 2017 20:46:00 -0600
14+
-- Robert Wolterman <[email protected]> Sat, 4 Mar 2017 20:46:00 -0600
915

1016
chip-io (0.5.3-1) unstable; urgency=low
1117

debian/files

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
python-chip-io_0.5.3-1_armhf.deb python optional
2-
python3-chip-io_0.5.3-1_armhf.deb python optional
1+
python-chip-io_0.5.4-1_armhf.deb python optional
2+
python3-chip-io_0.5.4-1_armhf.deb python optional

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
'Topic :: System :: Hardware']
1414

1515
setup(name = 'CHIP_IO',
16-
version = '0.5.4',
16+
version = '0.5.5',
1717
author = 'Robert Wolterman',
1818
author_email = '[email protected]',
1919
description = 'A module to control CHIP IO channels',

source/common.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ int gpio_allowed(int gpio)
263263
// We have a CHIP and the pin is for CHIP/BOTH
264264
if (((p->sbc_type == CHIP) || (p->sbc_type == BOTH)) && (is_this_chippro() == 0)) {
265265
if (DEBUG)
266-
printf(" ** gpio_allowed: pin allowed for chip or bth and we're a chip\n");
266+
printf(" ** gpio_allowed: pin allowed for chip or both and we're a chip\n");
267267
rtnval = 1;
268268
// We have a CHIP Pro and the pin is for CHIPPRO/BOTH
269269
} else if (((p->sbc_type == CHIPPRO) || (p->sbc_type == BOTH)) && (is_this_chippro() == 1)) {
@@ -296,7 +296,7 @@ int pwm_allowed(const char *key)
296296
// We have a CHIP and the pin is for CHIP/BOTH
297297
if ((p->sbc_type == BOTH) && (is_this_chippro() == 0)) {
298298
if (DEBUG)
299-
printf(" ** pwm_allowed: pwm allowed for chip or bth and we're a chip\n");
299+
printf(" ** pwm_allowed: pwm allowed for chip or both and we're a chip\n");
300300
rtnval = 1;
301301
// We have a CHIP Pro and the pin is for CHIPPRO/BOTH
302302
} else if (((p->sbc_type == CHIPPRO) || (p->sbc_type == BOTH)) && (is_this_chippro() == 1)) {
@@ -554,7 +554,7 @@ int compute_port_pin(const char *key, int gpio, int *port, int *pin)
554554
if (capable < 0) {
555555
capable = lookup_pud_capable_by_name(key);
556556
if (capable < 0) {
557-
capable = lookup_gpio_by_altname(key);
557+
capable = lookup_pud_capable_by_altname(key);
558558
if (capable < 0) {
559559
capable = 0; // default to false
560560
}

source/constants.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ void define_constants(PyObject *module)
8585
bcm = Py_BuildValue("i", BCM);
8686
PyModule_AddObject(module, "BCM", bcm);
8787

88-
version = Py_BuildValue("s", "0.5.4");
88+
version = Py_BuildValue("s", "0.5.5");
8989
PyModule_AddObject(module, "VERSION", version);
9090
}

0 commit comments

Comments
 (0)