1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-19 12:23:22 +00:00

Fixing issue where using alt name for the XIO would cause a segfault when speficying the pin as an input. This will close #62

This commit is contained in:
Robert Wolterman
2017-03-06 17:08:05 -06:00
parent dcd8ea6f40
commit 4da0812acd
7 changed files with 19 additions and 8 deletions

View File

@ -1,3 +1,7 @@
0.5.5
---
* 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
0.5.4
---
* Re-enabled the polarity setting for PWM based upon Issue #61

View File

@ -15,6 +15,7 @@ clean:
rm -f *.pyo *.pyc
rm -f *.egg
rm -rf __pycache__
rm -rf test/__pycache__/
rm -rf debian/python-chip-io*
rm -rf debian/python3-chip-io*

8
debian/changelog vendored
View File

@ -1,3 +1,9 @@
chip-io (0.5.5-1) unstable; urgency=low
* 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
-- Robert Wolterman <robert.wolterman@gmail.com> Mon, 6 Mar 2017 17:02:00 -0600
chip-io (0.5.4-1) unstable; urgency=low
* Re-enabled the polarity setting for PWM based upon Issue #61
@ -5,7 +11,7 @@ chip-io (0.5.4-1) unstable; urgency=low
* Cleaned up the polarity setting code to work when PWM is not enabled
* Fixed the unit test for pwm to verify we can set polarity
-- Robert Wolterman <robert.wolterman@gmail.com> Sun, 26 Feb 2017 20:46:00 -0600
-- Robert Wolterman <robert.wolterman@gmail.com> Sat, 4 Mar 2017 20:46:00 -0600
chip-io (0.5.3-1) unstable; urgency=low

4
debian/files vendored
View File

@ -1,2 +1,2 @@
python-chip-io_0.5.3-1_armhf.deb python optional
python3-chip-io_0.5.3-1_armhf.deb python optional
python-chip-io_0.5.4-1_armhf.deb python optional
python3-chip-io_0.5.4-1_armhf.deb python optional

View File

@ -13,7 +13,7 @@ classifiers = ['Development Status :: 3 - Alpha',
'Topic :: System :: Hardware']
setup(name = 'CHIP_IO',
version = '0.5.4',
version = '0.5.5',
author = 'Robert Wolterman',
author_email = 'robert.wolterman@gmail.com',
description = 'A module to control CHIP IO channels',

View File

@ -263,7 +263,7 @@ int gpio_allowed(int gpio)
// We have a CHIP and the pin is for CHIP/BOTH
if (((p->sbc_type == CHIP) || (p->sbc_type == BOTH)) && (is_this_chippro() == 0)) {
if (DEBUG)
printf(" ** gpio_allowed: pin allowed for chip or bth and we're a chip\n");
printf(" ** gpio_allowed: pin allowed for chip or both and we're a chip\n");
rtnval = 1;
// We have a CHIP Pro and the pin is for CHIPPRO/BOTH
} else if (((p->sbc_type == CHIPPRO) || (p->sbc_type == BOTH)) && (is_this_chippro() == 1)) {
@ -296,7 +296,7 @@ int pwm_allowed(const char *key)
// We have a CHIP and the pin is for CHIP/BOTH
if ((p->sbc_type == BOTH) && (is_this_chippro() == 0)) {
if (DEBUG)
printf(" ** pwm_allowed: pwm allowed for chip or bth and we're a chip\n");
printf(" ** pwm_allowed: pwm allowed for chip or both and we're a chip\n");
rtnval = 1;
// We have a CHIP Pro and the pin is for CHIPPRO/BOTH
} 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)
if (capable < 0) {
capable = lookup_pud_capable_by_name(key);
if (capable < 0) {
capable = lookup_gpio_by_altname(key);
capable = lookup_pud_capable_by_altname(key);
if (capable < 0) {
capable = 0; // default to false
}

View File

@ -85,6 +85,6 @@ void define_constants(PyObject *module)
bcm = Py_BuildValue("i", BCM);
PyModule_AddObject(module, "BCM", bcm);
version = Py_BuildValue("s", "0.5.4");
version = Py_BuildValue("s", "0.5.5");
PyModule_AddObject(module, "VERSION", version);
}