Yet Another WebIOPi+
 All Classes Namespaces Files Functions Variables Macros Pages
Functions | Variables
bridge.c File Reference
#include "Python.h"
#include "gpio.h"
#include "cpuinfo.h"

Go to the source code of this file.

Functions

static int module_setup (void)
 
static PyObject * py_get_function (PyObject *self, PyObject *args)
 
static PyObject * py_get_function_string (PyObject *self, PyObject *args)
 
static PyObject * py_set_function (PyObject *self, PyObject *args, PyObject *kwargs)
 
static PyObject * py_input (PyObject *self, PyObject *args)
 
static PyObject * py_output (PyObject *self, PyObject *args, PyObject *kwargs)
 
static PyObject * py_output_sequence (PyObject *self, PyObject *args, PyObject *kwargs)
 
static PyObject * py_pulseMilli (PyObject *self, PyObject *args, PyObject *kwargs)
 
static PyObject * py_pulseMilliRatio (PyObject *self, PyObject *args, PyObject *kwargs)
 
static PyObject * py_pulseMicro (PyObject *self, PyObject *args, PyObject *kwargs)
 
static PyObject * py_pulseMicroRatio (PyObject *self, PyObject *args, PyObject *kwargs)
 
static PyObject * py_pulseAngle (PyObject *self, PyObject *args, PyObject *kwargs)
 
static PyObject * py_pulseRatio (PyObject *self, PyObject *args, PyObject *kwargs)
 
static PyObject * py_pulse (PyObject *self, PyObject *args)
 
static PyObject * py_getPulse (PyObject *self, PyObject *args)
 
static PyObject * py_enablePWM (PyObject *self, PyObject *args)
 
static PyObject * py_disablePWM (PyObject *self, PyObject *args)
 
static PyObject * py_isPWMEnabled (PyObject *self, PyObject *args)
 
PyMODINIT_FUNC initGPIO (void)
 

Variables

static PyObject * _SetupException
 
static PyObject * _InvalidDirectionException
 
static PyObject * _InvalidChannelException
 
static PyObject * _InvalidPullException
 
static PyObject * _gpioCount
 
static PyObject * _low
 
static PyObject * _high
 
static PyObject * _in
 
static PyObject * _out
 
static PyObject * _alt0
 
static PyObject * _alt1
 
static PyObject * _alt2
 
static PyObject * _alt3
 
static PyObject * _alt4
 
static PyObject * _alt5
 
static PyObject * _pwm
 
static PyObject * _pud_off
 
static PyObject * _pud_up
 
static PyObject * _pud_down
 
static PyObject * _board_revision
 
static char * FUNCTIONS [] = {"IN", "OUT", "ALT5", "ALT4", "ALT0", "ALT1", "ALT2", "ALT3", "PWM"}
 
static char * PWM_MODES [] = {"none", "ratio", "angle"}
 
static int module_state = -1
 
PyMethodDef python_methods []
 

Function Documentation

PyMODINIT_FUNC initGPIO ( void  )
static int module_setup ( void  )
static
static PyObject* py_disablePWM ( PyObject *  self,
PyObject *  args 
)
static

Definition at line 517 of file bridge.c.

References _InvalidChannelException, disablePWM(), GPIO_COUNT, module_setup(), and SETUP_OK.

static PyObject* py_enablePWM ( PyObject *  self,
PyObject *  args 
)
static

Definition at line 496 of file bridge.c.

References _InvalidChannelException, enablePWM(), GPIO_COUNT, module_setup(), and SETUP_OK.

static PyObject* py_get_function ( PyObject *  self,
PyObject *  args 
)
static
static PyObject* py_get_function_string ( PyObject *  self,
PyObject *  args 
)
static
static PyObject* py_getPulse ( PyObject *  self,
PyObject *  args 
)
static
static PyObject* py_input ( PyObject *  self,
PyObject *  args 
)
static

Definition at line 167 of file bridge.c.

References _InvalidChannelException, GPIO_COUNT, input(), module_setup(), and SETUP_OK.

static PyObject* py_isPWMEnabled ( PyObject *  self,
PyObject *  args 
)
static

Definition at line 540 of file bridge.c.

References _InvalidChannelException, GPIO_COUNT, isPWMEnabled(), module_setup(), and SETUP_OK.

static PyObject* py_output ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static
static PyObject* py_output_sequence ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static
static PyObject* py_pulse ( PyObject *  self,
PyObject *  args 
)
static

Definition at line 446 of file bridge.c.

References _InvalidChannelException, GPIO_COUNT, module_setup(), pulseRatio(), and SETUP_OK.

static PyObject* py_pulseAngle ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static
static PyObject* py_pulseMicro ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static
static PyObject* py_pulseMicroRatio ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static
static PyObject* py_pulseMilli ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static
static PyObject* py_pulseMilliRatio ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static
static PyObject* py_pulseRatio ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static
static PyObject* py_set_function ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)
static

Variable Documentation

PyObject* _alt0
static

Definition at line 40 of file bridge.c.

Referenced by initGPIO().

PyObject* _alt1
static

Definition at line 41 of file bridge.c.

Referenced by initGPIO().

PyObject* _alt2
static

Definition at line 42 of file bridge.c.

Referenced by initGPIO().

PyObject* _alt3
static

Definition at line 43 of file bridge.c.

Referenced by initGPIO().

PyObject* _alt4
static

Definition at line 44 of file bridge.c.

Referenced by initGPIO().

PyObject* _alt5
static

Definition at line 45 of file bridge.c.

Referenced by initGPIO().

PyObject* _board_revision
static

Definition at line 52 of file bridge.c.

Referenced by initGPIO().

PyObject* _gpioCount
static

Definition at line 32 of file bridge.c.

Referenced by initGPIO().

PyObject* _high
static

Definition at line 36 of file bridge.c.

Referenced by initGPIO().

PyObject* _in
static

Definition at line 38 of file bridge.c.

Referenced by initGPIO().

PyObject* _InvalidChannelException
static
PyObject* _InvalidDirectionException
static
PyObject* _InvalidPullException
static

Definition at line 30 of file bridge.c.

Referenced by initGPIO(), and py_set_function().

PyObject* _low
static

Definition at line 35 of file bridge.c.

Referenced by initGPIO().

PyObject* _out
static

Definition at line 39 of file bridge.c.

Referenced by initGPIO().

PyObject* _pud_down
static

Definition at line 50 of file bridge.c.

Referenced by initGPIO().

PyObject* _pud_off
static

Definition at line 48 of file bridge.c.

Referenced by initGPIO().

PyObject* _pud_up
static

Definition at line 49 of file bridge.c.

Referenced by initGPIO().

PyObject* _pwm
static

Definition at line 46 of file bridge.c.

Referenced by initGPIO().

PyObject* _SetupException
static

Definition at line 27 of file bridge.c.

Referenced by initGPIO(), and module_setup().

char* FUNCTIONS[] = {"IN", "OUT", "ALT5", "ALT4", "ALT0", "ALT1", "ALT2", "ALT3", "PWM"}
static

Definition at line 54 of file bridge.c.

Referenced by py_get_function_string().

int module_state = -1
static

Definition at line 57 of file bridge.c.

Referenced by module_setup().

char* PWM_MODES[] = {"none", "ratio", "angle"}
static

Definition at line 55 of file bridge.c.

Referenced by py_getPulse().

PyMethodDef python_methods[]

Definition at line 563 of file bridge.c.

Referenced by initGPIO().