diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d563191..cd36f86 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,7 @@ +0.5.8 +--- +* Added 3 pins for the CHIP Pro as allowable for setting callbacks and edge detection to close out Issue #68 + 0.5.7 --- * Added the I2S pins on the CHIP Pro as GPIO capable diff --git a/debian/changelog b/debian/changelog index 85954ff..d3c1cf0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +chip-io (0.5.8-1) unstable; urgency=low + + * Added 3 pins for the CHIP Pro as allowable for setting callbacks and edge + detection to close out Issue #68 + + -- Robert Wolterman Tue, 02 May 2017 22:43:00 -0600 + chip-io (0.5.7-1) unstable; urgency=low * Added the I2S pins on the CHIP Pro as GPIO capable diff --git a/debian/files b/debian/files index c294cb9..13ed5ab 100644 --- a/debian/files +++ b/debian/files @@ -1,2 +1,2 @@ -python-chip-io_0.5.6-1_armhf.deb python optional -python3-chip-io_0.5.6-1_armhf.deb python optional +python-chip-io_0.5.7-1_armhf.deb python optional +python3-chip-io_0.5.7-1_armhf.deb python optional diff --git a/setup.py b/setup.py index 04bc7a8..87c5669 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ classifiers = ['Development Status :: 3 - Alpha', 'Topic :: System :: Hardware'] setup(name = 'CHIP_IO', - version = '0.5.7', + version = '0.5.8', author = 'Robert Wolterman', author_email = 'robert.wolterman@gmail.com', description = 'A module to control CHIP IO channels', diff --git a/source/constants.c b/source/constants.c index 60a209d..51e4ead 100644 --- a/source/constants.c +++ b/source/constants.c @@ -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.7"); + version = Py_BuildValue("s", "0.5.8"); PyModule_AddObject(module, "VERSION", version); } diff --git a/source/py_gpio.c b/source/py_gpio.c index e6f7914..5786ae3 100644 --- a/source/py_gpio.c +++ b/source/py_gpio.c @@ -596,6 +596,9 @@ static PyObject *py_add_event_callback(PyObject *self, PyObject *args, PyObject // check to ensure gpio is one of the allowed pins if (gpio != lookup_gpio_by_name("AP-EINT3") && gpio != lookup_gpio_by_name("AP-EINT1") + && gpio != lookup_gpio_by_name("I2S-MCLK") // CHIP PRO + && gpio != lookup_gpio_by_name("I2S-DI") // CHIP PRO + && gpio != lookup_gpio_by_name("PWM1") // CHIP PRO && !(gpio >= lookup_gpio_by_name("XIO-P0") && gpio <= lookup_gpio_by_name("XIO-P7"))) { PyErr_SetString(PyExc_ValueError, "Callbacks currently available on AP-EINT1, AP-EINT3, and XIO-P0 to XIO-P7 only"); return NULL; @@ -665,6 +668,9 @@ static PyObject *py_add_event_detect(PyObject *self, PyObject *args, PyObject *k // check to ensure gpio is one of the allowed pins if (gpio != lookup_gpio_by_name("AP-EINT3") && gpio != lookup_gpio_by_name("AP-EINT1") + && gpio != lookup_gpio_by_name("I2S-MCLK") // CHIP PRO + && gpio != lookup_gpio_by_name("I2S-DI") // CHIP PRO + && gpio != lookup_gpio_by_name("PWM1") // CHIP PRO && !(gpio >= lookup_gpio_by_name("XIO-P0") && gpio <= lookup_gpio_by_name("XIO-P7"))) { PyErr_SetString(PyExc_ValueError, "Edge Detection currently available on AP-EINT1, AP-EINT3, and XIO-P0 to XIO-P7 only"); return NULL; @@ -741,6 +747,9 @@ static PyObject *py_remove_event_detect(PyObject *self, PyObject *args) // check to ensure gpio is one of the allowed pins if (gpio != lookup_gpio_by_name("AP-EINT3") && gpio != lookup_gpio_by_name("AP-EINT1") + && gpio != lookup_gpio_by_name("I2S-MCLK") // CHIP PRO + && gpio != lookup_gpio_by_name("I2S-DI") // CHIP PRO + && gpio != lookup_gpio_by_name("PWM1") // CHIP PRO && !(gpio >= lookup_gpio_by_name("XIO-P0") && gpio <= lookup_gpio_by_name("XIO-P7"))) { PyErr_SetString(PyExc_ValueError, "Edge Detection currently available on AP-EINT1, AP-EINT3, and XIO-P0 to XIO-P7 only"); return NULL; @@ -845,6 +854,9 @@ static PyObject *py_wait_for_edge(PyObject *self, PyObject *args) // check to ensure gpio is one of the allowed pins if (gpio != lookup_gpio_by_name("AP-EINT3") && gpio != lookup_gpio_by_name("AP-EINT1") + && gpio != lookup_gpio_by_name("I2S-MCLK") // CHIP PRO + && gpio != lookup_gpio_by_name("I2S-DI") // CHIP PRO + && gpio != lookup_gpio_by_name("PWM1") // CHIP PRO && !(gpio >= lookup_gpio_by_name("XIO-P0") && gpio <= lookup_gpio_by_name("XIO-P7"))) { PyErr_SetString(PyExc_ValueError, "Edge Detection currently available on AP-EINT1, AP-EINT3, and XIO-P0 to XIO-P7 only"); return NULL;