Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
i2cgpio.h File Reference
#include "ultibo/gpio.h"
#include "ultibo/i2c.h"

Go to the source code of this file.

Data Structures

struct  _I2CGPIO_DEVICE

Macros

#define I2CGPIO_I2C_DESCRIPTION   "GPIO Software I2C"
 Description of I2CGPIO I2C device.
#define I2CGPIO_I2C_MAX_SIZE   0xFFFF
#define I2CGPIO_I2C_MIN_CLOCK   10000
 Arbitrary minimum of 10KHz, actual rate is determined by Delay parameter.
#define I2CGPIO_I2C_MAX_CLOCK   100000
 Arbitrary maximum of 100KHz, actual rate is determined by Delay parameter.
#define I2CGPIO_RETRY_COUNT   3
#define I2CGPIO_DEFAULT_TIMEOUT   100

Typedefs

typedef struct _I2CGPIO_DEVICE I2CGPIO_DEVICE

Functions

I2C_DEVICE *STDCALL i2cgpio_create (GPIO_DEVICE *gpio, uint32_t sda, uint32_t scl, uint32_t delay, uint32_t timeout, BOOL outputonly, BOOL opendrain)
uint32_t STDCALL i2cgpio_destroy (I2C_DEVICE *i2c)

Macro Definition Documentation

◆ I2CGPIO_I2C_DESCRIPTION

#define I2CGPIO_I2C_DESCRIPTION   "GPIO Software I2C"

Description of I2CGPIO I2C device.

I2CGPIO specific constants

◆ I2CGPIO_I2C_MAX_SIZE

#define I2CGPIO_I2C_MAX_SIZE   0xFFFF

◆ I2CGPIO_I2C_MIN_CLOCK

#define I2CGPIO_I2C_MIN_CLOCK   10000

Arbitrary minimum of 10KHz, actual rate is determined by Delay parameter.

◆ I2CGPIO_I2C_MAX_CLOCK

#define I2CGPIO_I2C_MAX_CLOCK   100000

Arbitrary maximum of 100KHz, actual rate is determined by Delay parameter.

◆ I2CGPIO_RETRY_COUNT

#define I2CGPIO_RETRY_COUNT   3

◆ I2CGPIO_DEFAULT_TIMEOUT

#define I2CGPIO_DEFAULT_TIMEOUT   100

Typedef Documentation

◆ I2CGPIO_DEVICE

I2CGPIO specific types

Function Documentation

◆ i2cgpio_create()

I2C_DEVICE *STDCALL i2cgpio_create ( GPIO_DEVICE * gpio,
uint32_t sda,
uint32_t scl,
uint32_t delay,
uint32_t timeout,
BOOL outputonly,
BOOL opendrain )

I2CGPIO Functions

◆ i2cgpio_destroy()

uint32_t STDCALL i2cgpio_destroy ( I2C_DEVICE * i2c)