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

Adds softpwm disabling and restructures thread

This commit is contained in:
Brady L. Hurlburt
2016-04-23 19:17:56 -04:00
parent 9645d2aae3
commit d7bf982b11
2 changed files with 110 additions and 104 deletions

View File

@ -53,6 +53,8 @@ static PyObject *py_start_channel(PyObject *self, PyObject *args, PyObject *kwar
int polarity = 0;
static char *kwlist[] = {"channel", "duty_cycle", "frequency", "polarity", NULL};
printf("Made it to CHIPIO softpwm start");
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|ffi", kwlist, &channel, &duty_cycle, &frequency, &polarity)) {
return NULL;
}
@ -156,7 +158,7 @@ static PyObject *py_set_frequency(PyObject *self, PyObject *args, PyObject *kwar
return NULL;
}
if (pwm_set_frequency(key, frequency) == -1) {
if (softpwm_set_frequency(key, frequency) == -1) {
PyErr_SetString(PyExc_RuntimeError, "You must start() the PWM channel first");
return NULL;
}