Skip to content

Commit 9866c2e

Browse files
committed
remove dead code
1 parent 9e1bd7b commit 9866c2e

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

source/py_pwm.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@ SOFTWARE.
2626
#include "common.h"
2727
#include "c_pwm.h"
2828

29-
static int init_module(void)
30-
{
31-
int i;
32-
33-
module_setup = 0;
34-
35-
for (i=0; i<120; i++)
36-
pwm_pins[i] = -1;
37-
38-
return 0;
39-
}
40-
4129
// python function cleanup()
4230
static PyObject *py_cleanup(PyObject *self, PyObject *args)
4331
{
@@ -57,8 +45,9 @@ static PyObject *py_start_channel(PyObject *self, PyObject *args, PyObject *kwar
5745
int polarity = 0;
5846
static char *kwlist[] = {"channel", "duty_cycle", "frequency", "polarity", NULL};
5947

60-
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|ffi", kwlist, &channel, &duty_cycle, &frequency, &polarity))
48+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|ffi", kwlist, &channel, &duty_cycle, &frequency, &polarity)) {
6149
return NULL;
50+
}
6251

6352
if (!get_pwm_key(channel, key)) {
6453
PyErr_SetString(PyExc_ValueError, "Invalid PWM key or name.");

0 commit comments

Comments
 (0)