Hardware I2C data types. More...

Data Structures

struct gos_i2c_message_t
Input/output message context used by gos_i2c_transfer() More...
struct gos_i2c_device_t
I2C peripheral context used by direct APIs. More...

Enumerations

enum gos_i2c_address_width_t {
GOS_I2C_7BIT ,
GOS_I2C_10BIT ,
GOS_I2C_16BIT
}
enum gos_i2c_flag_t {
GOS_I2C_MSG_WRITE = (1 << 0 ),
GOS_I2C_MSG_READ = (0 << 0 ),
GOS_I2C_MSG_NO_STOP_SEQ = (1 << 1 ),
GOS_I2C_MSG_STOP_SEQ = (0 << 1 ),
GOS_I2C_MSG_READ_AFTER_WRITE = (1 << 2 ),
GOS_I2C_MSG_NO_READ_AFTER_WRITE = (0 << 2 ),
GOS_I2C_MSG_NO_START_SEQ = (1 << 3 ),
GOS_I2C_MSG_START_SEQ = (0 << 3 )
}
enum gos_i2c_speed_t {
GOS_I2C_CLOCK_LOW_SPEED = (10*1000),
GOS_I2C_CLOCK_STANDARD_SPEED = (100*1000),
GOS_I2C_CLOCK_HIGH_SPEED = (400*1000)
}
enum gos_i2c_stream_flag_t { GOS_I2C_FLAG_STREAM_HEXIFY = (1 << 0) }
Stream configure flags. More...
enum gos_i2c_stream_write_flag_t { GOS_I2C_FLAG_STREAM_CONTINUED_WRITE = (1 << 0) }
enum gos_i2c_t {
GOS_I2C_0 ,
GOS_GPIO_MAX
}

Detailed Description

Hardware I2C data types.

Enumeration Type Documentation

gos_i2c_address_width_t

I2C address width

Enumerator
GOS_I2C_7BIT

GOS_I2C_7BIT.

GOS_I2C_10BIT

GOS_I2C_10BIT.

GOS_I2C_16BIT

GOS_I2C_16BIT.

gos_i2c_flag_t

I2C message flags

Enumerator
GOS_I2C_MSG_WRITE

GOS_I2C_MSG_WRITE.

GOS_I2C_MSG_READ

GOS_I2C_MSG_READ.

GOS_I2C_MSG_NO_STOP_SEQ

GOS_I2C_MSG_NO_STOP_SEQ.

GOS_I2C_MSG_STOP_SEQ

GOS_I2C_MSG_STOP_SEQ.

GOS_I2C_MSG_READ_AFTER_WRITE

GOS_I2C_MSG_READ_AFTER_WRITE.

GOS_I2C_MSG_NO_READ_AFTER_WRITE

GOS_I2C_MSG_NO_READ_AFTER_WRITE.

GOS_I2C_MSG_NO_START_SEQ

GOS_I2C_MSG_NO_START_SEQ.

GOS_I2C_MSG_START_SEQ

GOS_I2C_MSG_START_SEQ.

gos_i2c_speed_t

I2C standard clock rates

Enumerator
GOS_I2C_CLOCK_LOW_SPEED

GOS_I2C_CLOCK_LOW_SPEED.

GOS_I2C_CLOCK_STANDARD_SPEED

GOS_I2C_CLOCK_STANDARD_SPEED.

GOS_I2C_CLOCK_HIGH_SPEED

GOS_I2C_CLOCK_HIGH_SPEED.

gos_i2c_stream_flag_t

Stream configure flags.

Enumerator
GOS_I2C_FLAG_STREAM_HEXIFY

Convert input hex string to binary, output binary to hex string.

gos_i2c_stream_write_flag_t

Write specific flags

Enumerator
GOS_I2C_FLAG_STREAM_CONTINUED_WRITE

continued write: if this flag is set then no stop condition will be sent after the write. This allows for issuing the write command multiple times

gos_i2c_t

Gecko OS I2C ID

Enumerator
GOS_I2C_0

This is just a placeholder, this is platform dependent.

GOS_GPIO_MAX

Maximum number of GPIOs the platform supports in Gecko OS.

Maximum number of I2Cs the platform supports in Gecko OS.