![]() |
i2c
1.4.2
RoadNarrows Robotics I2C Package
|
Swig generated core wrapper c file. More...
#include <Python.h>
#include <string.h>
#include "rnr/rnrconfig.h"
#include <float.h>
#include <math.h>
#include <limits.h>
#include <errno.h>
#include "rnr/i2c.h"
#include "i2ccore.h"
Go to the source code of this file.
Classes | |
struct | swig_type_info |
struct | swig_cast_info |
struct | swig_module_info |
struct | PyHeapTypeObject |
struct | swig_const_info |
struct | SwigPyClientData |
struct | SwigPyObject |
struct | SwigPyPacked |
struct | swig_globalvar |
struct | swig_varlinkobject |
Typedefs | |
typedef void *(* | swig_converter_func) (void *, int *) |
typedef struct swig_type_info *(* | swig_dycast_func) (void **) |
typedef struct swig_type_info | swig_type_info |
typedef struct swig_cast_info | swig_cast_info |
typedef struct swig_module_info | swig_module_info |
typedef int | Py_ssize_t |
typedef inquiry | lenfunc |
typedef intargfunc | ssizeargfunc |
typedef intintargfunc | ssizessizeargfunc |
typedef intobjargproc | ssizeobjargproc |
typedef intintobjargproc | ssizessizeobjargproc |
typedef getreadbufferproc | readbufferproc |
typedef getwritebufferproc | writebufferproc |
typedef getsegcountproc | segcountproc |
typedef getcharbufferproc | charbufferproc |
typedef destructor | freefunc |
typedef struct swig_const_info | swig_const_info |
typedef struct swig_globalvar | swig_globalvar |
typedef struct swig_varlinkobject | swig_varlinkobject |
Functions | |
static int | SWIG_TypeNameComp (const char *f1, const char *l1, const char *f2, const char *l2) |
static int | SWIG_TypeCmp (const char *nb, const char *tb) |
static int | SWIG_TypeEquiv (const char *nb, const char *tb) |
static swig_cast_info * | SWIG_TypeCheck (const char *c, swig_type_info *ty) |
static swig_cast_info * | SWIG_TypeCheckStruct (swig_type_info *from, swig_type_info *ty) |
static void * | SWIG_TypeCast (swig_cast_info *ty, void *ptr, int *newmemory) |
static swig_type_info * | SWIG_TypeDynamicCast (swig_type_info *ty, void **ptr) |
static const char * | SWIG_TypeName (const swig_type_info *ty) |
static const char * | SWIG_TypePrettyName (const swig_type_info *type) |
static void | SWIG_TypeClientData (swig_type_info *ti, void *clientdata) |
static void | SWIG_TypeNewClientData (swig_type_info *ti, void *clientdata) |
static swig_type_info * | SWIG_MangledTypeQueryModule (swig_module_info *start, swig_module_info *end, const char *name) |
static swig_type_info * | SWIG_TypeQueryModule (swig_module_info *start, swig_module_info *end, const char *name) |
static char * | SWIG_PackData (char *c, void *ptr, size_t sz) |
static const char * | SWIG_UnpackData (const char *c, void *ptr, size_t sz) |
static char * | SWIG_PackVoidPtr (char *buff, void *ptr, const char *name, size_t bsz) |
static const char * | SWIG_UnpackVoidPtr (const char *c, void **ptr, const char *name) |
static char * | SWIG_PackDataName (char *buff, void *ptr, size_t sz, const char *name, size_t bsz) |
static const char * | SWIG_UnpackDataName (const char *c, void *ptr, size_t sz, const char *name) |
static char * | SWIG_Python_str_AsChar (PyObject *str) |
static PyObject * | SWIG_Python_str_FromChar (const char *c) |
static PyObject * | PyString_FromFormat (const char *fmt,...) |
static PyObject * | PyBool_FromLong (long ok) |
static long | PyNumber_AsSsize_t (PyObject *x, void *exc) |
static PyObject * | SWIG_Python_ErrorType (int code) |
static void | SWIG_Python_AddErrorMsg (const char *mesg) |
static PyObject * | SWIG_PyInstanceMethod_New (PyObject *self, PyObject *func) |
static void | SWIG_Python_SetErrorObj (PyObject *errtype, PyObject *obj) |
static void | SWIG_Python_SetErrorMsg (PyObject *errtype, const char *msg) |
static void | SWIG_Python_SetConstant (PyObject *d, const char *name, PyObject *obj) |
static PyObject * | SWIG_Python_AppendOutput (PyObject *result, PyObject *obj) |
static Py_ssize_t | SWIG_Python_UnpackTuple (PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) |
static PyObject * | SWIG_Py_Void (void) |
static int | SWIG_Python_CheckImplicit (swig_type_info *ty) |
static PyObject * | SWIG_Python_ExceptionType (swig_type_info *desc) |
static SwigPyClientData * | SwigPyClientData_New (PyObject *obj) |
static void | SwigPyClientData_Del (SwigPyClientData *data) |
static PyObject * | SwigPyObject_long (SwigPyObject *v) |
static PyObject * | SwigPyObject_format (const char *fmt, SwigPyObject *v) |
static PyObject * | SwigPyObject_oct (SwigPyObject *v) |
static PyObject * | SwigPyObject_hex (SwigPyObject *v) |
static PyObject * | SwigPyObject_repr (SwigPyObject *v, PyObject *args) |
static int | SwigPyObject_compare (SwigPyObject *v, SwigPyObject *w) |
static PyObject * | SwigPyObject_richcompare (SwigPyObject *v, SwigPyObject *w, int op) |
static PyTypeObject * | SwigPyObject_TypeOnce (void) |
static PyTypeObject * | SwigPyObject_type (void) |
static int | SwigPyObject_Check (PyObject *op) |
static PyObject * | SwigPyObject_New (void *ptr, swig_type_info *ty, int own) |
static void | SwigPyObject_dealloc (PyObject *v) |
static PyObject * | SwigPyObject_append (PyObject *v, PyObject *next) |
static PyObject * | SwigPyObject_next (PyObject *v, PyObject *args) |
static PyObject * | SwigPyObject_disown (PyObject *v, PyObject *args) |
static PyObject * | SwigPyObject_acquire (PyObject *v, PyObject *args) |
static PyObject * | SwigPyObject_own (PyObject *v, PyObject *args) |
static PyObject * | SwigPyObject_getattr (SwigPyObject *sobj, char *name) |
static int | SwigPyPacked_print (SwigPyPacked *v, FILE *fp, int flags) |
static PyObject * | SwigPyPacked_repr (SwigPyPacked *v) |
static PyObject * | SwigPyPacked_str (SwigPyPacked *v) |
static int | SwigPyPacked_compare (SwigPyPacked *v, SwigPyPacked *w) |
static PyTypeObject * | SwigPyPacked_TypeOnce (void) |
static PyTypeObject * | SwigPyPacked_type (void) |
static int | SwigPyPacked_Check (PyObject *op) |
static void | SwigPyPacked_dealloc (PyObject *v) |
static PyObject * | SwigPyPacked_New (void *ptr, size_t size, swig_type_info *ty) |
static swig_type_info * | SwigPyPacked_UnpackData (PyObject *obj, void *ptr, size_t size) |
static PyObject * | _SWIG_This (void) |
static PyObject * | SWIG_This (void) |
static SwigPyObject * | SWIG_Python_GetSwigThis (PyObject *pyobj) |
static int | SWIG_Python_AcquirePtr (PyObject *obj, int own) |
static int | SWIG_Python_ConvertPtrAndOwn (PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) |
static int | SWIG_Python_ConvertFunctionPtr (PyObject *obj, void **ptr, swig_type_info *ty) |
static int | SWIG_Python_ConvertPacked (PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) |
static PyObject * | SWIG_Python_NewShadowInstance (SwigPyClientData *data, PyObject *swig_this) |
static void | SWIG_Python_SetSwigThis (PyObject *inst, PyObject *swig_this) |
static PyObject * | SWIG_Python_InitShadowInstance (PyObject *args) |
static PyObject * | SWIG_Python_NewPointerObj (PyObject *self, void *ptr, swig_type_info *type, int flags) |
static PyObject * | SWIG_Python_NewPackedObj (void *ptr, size_t sz, swig_type_info *type) |
static swig_module_info * | SWIG_Python_GetModule (void *clientdata) |
static int | PyModule_AddObject (PyObject *m, char *name, PyObject *o) |
static void | SWIG_Python_DestroyModule (void *vptr) |
static void | SWIG_Python_SetModule (swig_module_info *swig_module) |
static PyObject * | SWIG_Python_TypeCache (void) |
static swig_type_info * | SWIG_Python_TypeQuery (const char *type) |
static int | SWIG_Python_AddErrMesg (const char *mesg, int infront) |
static int | SWIG_Python_ArgFail (int argnum) |
static const char * | SwigPyObject_GetDesc (PyObject *self) |
static void | SWIG_Python_TypeError (const char *type, PyObject *obj) |
static void * | SWIG_Python_MustGetPtr (PyObject *obj, swig_type_info *ty, int argnum, int flags) |
static byte_t * | new_byteArray (size_t nelements) |
static void | delete_byteArray (byte_t *ary) |
static byte_t | byteArray_getitem (byte_t *ary, size_t index) |
static void | byteArray_setitem (byte_t *ary, size_t index, byte_t value) |
static int | SWIG_AsVal_double (PyObject *obj, double *val) |
static int | SWIG_CanCastAsInteger (double *d, double min, double max) |
static int | SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) |
static int | SWIG_AsVal_size_t (PyObject *obj, size_t *val) |
static PyObject * | SWIG_From_unsigned_SS_long (unsigned long value) |
static PyObject * | SWIG_From_unsigned_SS_char (unsigned char value) |
static int | SWIG_AsVal_unsigned_SS_char (PyObject *obj, unsigned char *val) |
static uint_t * | new_uintp () |
static uint_t * | copy_uintp (uint_t value) |
static void | delete_uintp (uint_t *obj) |
static void | uintp_assign (uint_t *obj, uint_t value) |
static uint_t | uintp_value (uint_t *obj) |
static int | SWIG_AsVal_unsigned_SS_int (PyObject *obj, unsigned int *val) |
static PyObject * | SWIG_From_unsigned_SS_int (unsigned int value) |
int | i2ccore_open (const char *device) |
Open a I2C bus device. More... | |
int | i2ccore_close (int fd) |
Close an open I2C bus device. More... | |
int | i2ccore_read (int fd, unsigned short cur_addr, unsigned short addr, byte_t buf[], unsigned int count) |
Read data from an attached device connected to the open I2C bus. More... | |
int | i2ccore_write (int fd, unsigned short cur_addr, unsigned short addr, byte_t buf[], unsigned int count) |
Write data to an attached device connected to the open I2C bus. More... | |
int | i2ccore_transfer (int fd, unsigned short cur_addr, unsigned short addr, byte_t wbuf[], unsigned int wcount, byte_t rbuf[], unsigned int rcount) |
Transfer data to an attached device connected to the open I2C bus reead back. More... | |
int | i2ccore_check (int fd, unsigned short cur_addr, unsigned short addr) |
Test for the existence of a device with the given address. More... | |
static swig_type_info * | SWIG_pchar_descriptor (void) |
static int | SWIG_AsCharPtrAndSize (PyObject *obj, char **cptr, size_t *psize, int *alloc) |
static PyObject * | SWIG_From_int (int value) |
static int | SWIG_AsVal_long (PyObject *obj, long *val) |
static int | SWIG_AsVal_int (PyObject *obj, int *val) |
static int | SWIG_AsVal_unsigned_SS_short (PyObject *obj, unsigned short *val) |
static PyObject * | _wrap_new_byteArray (PyObject *self, PyObject *args) |
static PyObject * | _wrap_delete_byteArray (PyObject *self, PyObject *args) |
static PyObject * | _wrap_byteArray_getitem (PyObject *self, PyObject *args) |
static PyObject * | _wrap_byteArray_setitem (PyObject *self, PyObject *args) |
static PyObject * | _wrap_new_uintp (PyObject *self, PyObject *args) |
static PyObject * | _wrap_copy_uintp (PyObject *self, PyObject *args) |
static PyObject * | _wrap_delete_uintp (PyObject *self, PyObject *args) |
static PyObject * | _wrap_uintp_assign (PyObject *self, PyObject *args) |
static PyObject * | _wrap_uintp_value (PyObject *self, PyObject *args) |
static PyObject * | _wrap_i2ccore_open (PyObject *self, PyObject *args) |
static PyObject * | _wrap_i2ccore_close (PyObject *self, PyObject *args) |
static PyObject * | _wrap_i2ccore_read (PyObject *self, PyObject *args) |
static PyObject * | _wrap_i2ccore_write (PyObject *self, PyObject *args) |
static PyObject * | _wrap_i2ccore_transfer (PyObject *self, PyObject *args) |
static PyObject * | _wrap_i2ccore_check (PyObject *self, PyObject *args) |
static void | SWIG_InitializeModule (void *clientdata) |
static void | SWIG_PropagateClientData (void) |
static PyObject * | swig_varlink_repr (swig_varlinkobject *v) |
static PyObject * | swig_varlink_str (swig_varlinkobject *v) |
static int | swig_varlink_print (swig_varlinkobject *v, FILE *fp, int flags) |
static void | swig_varlink_dealloc (swig_varlinkobject *v) |
static PyObject * | swig_varlink_getattr (swig_varlinkobject *v, char *n) |
static int | swig_varlink_setattr (swig_varlinkobject *v, char *n, PyObject *p) |
static PyTypeObject * | swig_varlink_type (void) |
static PyObject * | SWIG_Python_newvarlink (void) |
static void | SWIG_Python_addvarlink (PyObject *p, char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p)) |
static PyObject * | SWIG_globals (void) |
static void | SWIG_Python_InstallConstants (PyObject *d, swig_const_info constants[]) |
static void | SWIG_Python_FixMethods (PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) |
void | init_i2ccore (void) |
Variables | |
static PyMethodDef | swigobject_methods [] |
static PyObject * | swig_this = NULL |
static swig_type_info * | swig_types [7] |
static swig_module_info | swig_module = {swig_types, 6, 0, 0, 0, 0} |
static PyMethodDef | SwigMethods [] |
static swig_type_info | _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0} |
static swig_type_info | _swigt__p_int = {"_p_int", "bool_t *|int *", 0, 0, (void*)0, 0} |
static swig_type_info | _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|byte_t *", 0, 0, (void*)0, 0} |
static swig_type_info | _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|uint_t *", 0, 0, (void*)0, 0} |
static swig_type_info | _swigt__p_unsigned_long = {"_p_unsigned_long", "unsigned long *|ulong_t *", 0, 0, (void*)0, 0} |
static swig_type_info | _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|ushort_t *", 0, 0, (void*)0, 0} |
static swig_type_info * | swig_type_initial [] |
static swig_cast_info | _swigc__p_char [] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}} |
static swig_cast_info | _swigc__p_int [] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}} |
static swig_cast_info | _swigc__p_unsigned_char [] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}} |
static swig_cast_info | _swigc__p_unsigned_int [] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}} |
static swig_cast_info | _swigc__p_unsigned_long [] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}} |
static swig_cast_info | _swigc__p_unsigned_short [] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}} |
static swig_cast_info * | swig_cast_initial [] |
static swig_const_info | swig_const_table [] |
Swig generated core wrapper c file.
Definition in file i2ccore_wrap.c.
#define Py_VISIT | ( | op | ) |
Definition at line 927 of file i2ccore_wrap.c.
int i2ccore_check | ( | int | fd, |
unsigned short | cur_addr, | ||
unsigned short | addr | ||
) |
Test for the existence of a device with the given address.
fd | File descriptor. |
cur_addr | I2C address of last I/O operation. |
addr | I2C device address to read. |
Definition at line 3414 of file i2ccore_wrap.c.
References i2c_struct::addr, i2c_struct::fd, i2c_exists(), i2ccore_close(), i2ccore_open(), i2ccore_read(), i2ccore_transfer(), and i2ccore_write().
int i2ccore_close | ( | int | fd | ) |
Close an open I2C bus device.
Definition at line 3309 of file i2ccore_wrap.c.
References i2c_struct::fd, and i2c_close().
Referenced by i2ccore_check().
int i2ccore_open | ( | const char * | device | ) |
Open a I2C bus device.
device | Device name. |
Definition at line 3292 of file i2ccore_wrap.c.
References i2c_struct::fd, and i2c_open().
Referenced by i2ccore_check().
int i2ccore_read | ( | int | fd, |
unsigned short | cur_addr, | ||
unsigned short | addr, | ||
byte_t | buf[], | ||
unsigned int | count | ||
) |
Read data from an attached device connected to the open I2C bus.
fd | File descriptor. | |
cur_addr | I2C address of last I/O operation. | |
addr | I2C device address to read. | |
[out] | buf | Output buffer. |
count | Number of byte to read. |
Definition at line 3333 of file i2ccore_wrap.c.
References i2c_struct::addr, i2c_struct::fd, and i2c_read().
Referenced by i2ccore_check().
int i2ccore_transfer | ( | int | fd, |
unsigned short | cur_addr, | ||
unsigned short | addr, | ||
byte_t | wbuf[], | ||
unsigned int | wcount, | ||
byte_t | rbuf[], | ||
unsigned int | rcount | ||
) |
Transfer data to an attached device connected to the open I2C bus reead back.
fd | File descriptor. | |
cur_addr | I2C address of last I/O operation. | |
addr | I2C device address to read. | |
[in] | wbuf | Input buffer. |
wcount | Number of byte to write. | |
[out] | rbuf | Output buffer. |
rcount | Number of byte to read. |
Definition at line 3390 of file i2ccore_wrap.c.
References i2c_struct::addr, i2c_struct::fd, and i2c_transfer().
Referenced by i2ccore_check().
int i2ccore_write | ( | int | fd, |
unsigned short | cur_addr, | ||
unsigned short | addr, | ||
byte_t | buf[], | ||
unsigned int | count | ||
) |
Write data to an attached device connected to the open I2C bus.
fd | File descriptor. | |
cur_addr | I2C address of last I/O operation. | |
addr | I2C device address to read. | |
[in] | buf | Input buffer. |
count | Number of byte to write. |
Definition at line 3360 of file i2ccore_wrap.c.
References i2c_struct::addr, i2c_struct::fd, and i2c_write().
Referenced by i2ccore_check().
|
static |
Definition at line 4171 of file i2ccore_wrap.c.
|
static |
Definition at line 4183 of file i2ccore_wrap.c.
|
static |
Definition at line 4155 of file i2ccore_wrap.c.
|
static |
Definition at line 4125 of file i2ccore_wrap.c.
|
static |
Definition at line 1835 of file i2ccore_wrap.c.