mirror of
https://github.com/xtacocorex/CHIP_IO
synced 2025-07-20 04:43:21 +00:00
Fixing issue with the enable 1.8v pin code. Updating version to 0.2.7
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
0.2.7
|
||||||
|
----
|
||||||
|
* Fix to the Enable 1.8V Pin code as it wasn't working due to bit shifting isn't allowed on a float.
|
||||||
|
* Updated README to denote the PocketCHIP Pin names better
|
||||||
|
|
||||||
0.2.6
|
0.2.6
|
||||||
----
|
----
|
||||||
* Fix to keep the GPIO value file open until the pin is unexported (issue #34)
|
* Fix to keep the GPIO value file open until the pin is unexported (issue #34)
|
||||||
|
@ -35,7 +35,7 @@ def set_1v8_pin_voltage(voltage):
|
|||||||
return False
|
return False
|
||||||
if voltage < 1.8 or voltage > 3.3:
|
if voltage < 1.8 or voltage > 3.3:
|
||||||
return False
|
return False
|
||||||
voltage=round((voltage - 1.8) / 0.1) << 4
|
voltage=int(round((voltage - 1.8) / 0.1)) << 4
|
||||||
if subprocess.call(["/usr/sbin/i2cset", "-f", "-y" ,"0", "0x34", "0x90", "0x03"]):
|
if subprocess.call(["/usr/sbin/i2cset", "-f", "-y" ,"0", "0x34", "0x90", "0x03"]):
|
||||||
return False
|
return False
|
||||||
if subprocess.call(["/usr/sbin/i2cset", "-f", "-y", "0", "0x34", "0x91", str(voltage)]):
|
if subprocess.call(["/usr/sbin/i2cset", "-f", "-y", "0", "0x34", "0x91", str(voltage)]):
|
||||||
|
2
setup.py
2
setup.py
@ -20,7 +20,7 @@ classifiers = ['Development Status :: 3 - Alpha',
|
|||||||
'Topic :: System :: Hardware']
|
'Topic :: System :: Hardware']
|
||||||
|
|
||||||
setup(name = 'CHIP_IO',
|
setup(name = 'CHIP_IO',
|
||||||
version = '0.2.6',
|
version = '0.2.7',
|
||||||
author = 'Robert Wolterman',
|
author = 'Robert Wolterman',
|
||||||
author_email = 'robert.wolterman@gmail.com',
|
author_email = 'robert.wolterman@gmail.com',
|
||||||
description = 'A module to control CHIP IO channels',
|
description = 'A module to control CHIP IO channels',
|
||||||
|
@ -76,6 +76,6 @@ void define_constants(PyObject *module)
|
|||||||
both_edge = Py_BuildValue("i", BOTH_EDGE);
|
both_edge = Py_BuildValue("i", BOTH_EDGE);
|
||||||
PyModule_AddObject(module, "BOTH", both_edge);
|
PyModule_AddObject(module, "BOTH", both_edge);
|
||||||
|
|
||||||
version = Py_BuildValue("s", "0.2.6");
|
version = Py_BuildValue("s", "0.2.7");
|
||||||
PyModule_AddObject(module, "VERSION", version);
|
PyModule_AddObject(module, "VERSION", version);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user