1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-20 04:43:21 +00:00

More updates to the library to add debug printing

This commit is contained in:
Robert Wolterman
2017-01-26 05:55:30 +00:00
parent bd7f667041
commit 8221016c10
8 changed files with 67 additions and 40 deletions

View File

@ -195,12 +195,11 @@ PyMethodDef pwm_methods[] = {
{ "set_duty_cycle", (PyCFunction)py_set_duty_cycle, METH_VARARGS, "Change the duty cycle\ndutycycle - between 0.0 and 100.0" },
{ "set_frequency", (PyCFunction)py_set_frequency, METH_VARARGS, "Change the frequency\nfrequency - frequency in Hz (freq > 0.0)" },
{ "cleanup", (PyCFunction)py_cleanup, METH_VARARGS, "Clean up by resetting all GPIO channels that have been used by this program to INPUT with no pullup/pulldown and no event detection"},
//{"setwarnings", py_setwarnings, METH_VARARGS, "Enable or disable warning messages"},
{NULL, NULL, 0, NULL}
};
#if PY_MAJOR_VERSION > 2
static struct PyModuleDef chippwmmodule = {
static struct PyModuleDef chipspwmmodule = {
PyModuleDef_HEAD_INIT,
"SOFTPWM", // name of module
moduledocstring, // module documentation, may be NULL
@ -218,7 +217,7 @@ PyMODINIT_FUNC initSOFTPWM(void)
PyObject *module = NULL;
#if PY_MAJOR_VERSION > 2
if ((module = PyModule_Create(&chippwmmodule)) == NULL)
if ((module = PyModule_Create(&chipspwmmodule)) == NULL)
return NULL;
#else
if ((module = Py_InitModule3("SOFTPWM", pwm_methods, moduledocstring)) == NULL)