26#ifndef _ULTIBO_I2CGPIO_H
27#define _ULTIBO_I2CGPIO_H
37#define I2CGPIO_I2C_DESCRIPTION "GPIO Software I2C"
39#define I2CGPIO_I2C_MAX_SIZE 0xFFFF
40#define I2CGPIO_I2C_MIN_CLOCK 10000
41#define I2CGPIO_I2C_MAX_CLOCK 100000
43#define I2CGPIO_RETRY_COUNT 3
45#define I2CGPIO_DEFAULT_TIMEOUT 100
int32_t LONGBOOL
Compatibility with FPC LongBool type (4 bytes).
Definition globaltypes.h:56
#define STDCALL
Definition globaltypes.h:45
_Bool BOOL
Built in Boolean type (1 byte) (Redeclared here for flexibility).
Definition globaltypes.h:55
struct _GPIO_DEVICE GPIO_DEVICE
Forward declared for GPIOPin.
Definition gpio.h:85
struct _I2C_DEVICE I2C_DEVICE
Definition i2c.h:81
uint32_t STDCALL i2cgpio_destroy(I2C_DEVICE *i2c)
I2C_DEVICE *STDCALL i2cgpio_create(GPIO_DEVICE *gpio, uint32_t sda, uint32_t scl, uint32_t delay, uint32_t timeout, BOOL outputonly, BOOL opendrain)
struct _I2CGPIO_DEVICE I2CGPIO_DEVICE
Definition i2cgpio.h:48
GPIO_DEVICE * gpio
The GPIO device this device is connected to.
Definition i2cgpio.h:54
LONGBOOL opendrain
Clock and Data are open drain, no need to simulate by switching direction.
Definition i2cgpio.h:60
uint32_t sda
GPIO pin for the SDA line.
Definition i2cgpio.h:55
uint32_t delay
Clock and Data delay in microseconds.
Definition i2cgpio.h:57
uint32_t scl
GPIO pin for the SCL line.
Definition i2cgpio.h:56
I2C_DEVICE i2c
Definition i2cgpio.h:52
LONGBOOL ignorenak
If True Ignore NAK responses and continue.
Definition i2cgpio.h:62
uint32_t timeout
Clock timeout in milliseconds.
Definition i2cgpio.h:58
LONGBOOL outputonly
Clock line is output only, no test for SCL high.
Definition i2cgpio.h:59