37 #include "pprzlink/pprzlink_device.h"
39 #define GPS_I2C_BUF_SIZE 255
void gps_ubx_i2c_init(void)
init function
struct i2c_transaction trans
i2c transaction
void gps_i2c_begin(void)
config is done, begin reading messages
uint16_t rx_buf_avail
how many bytes are waiting to be read
uint16_t tx_buf_idx
tx buf index
uint16_t rx_buf_idx
rx buf index
GpsI2CReadState
read states
@ gps_i2c_read_data
read data from ubx buffer
@ gps_i2c_read_standby
dont read anything
@ gps_i2c_read_sizeof
read size of ubx buffer
static void GpsUbxi2cEvent(void)
i2c event
bool tx_rdy
are we ready to transmit
bool gps_i2c_tx_is_ready(void)
is driver ready to send a message
void gps_ubx_i2c_periodic(void)
handle message sending
uint8_t tx_buf[GPS_I2C_BUF_SIZE]
transmit buffer
void gps_ubx_i2c_read_event(void)
handle message reception
struct link_device device
ppz link device
uint8_t rx_buf[GPS_I2C_BUF_SIZE]
receive buffer
GpsI2CWriteState
write states
@ gps_i2c_write_cfg
send a config msg and get reply
@ gps_i2c_write_request_size
request size of ubx buffer
@ gps_i2c_write_standby
wait for gps_ubx to read buffer or ucenter to transmit
GpsI2CReadState read_state
int baudrate
baudrate, unused
GpsI2CWriteState write_state
enum I2CTransactionStatus status
Transaction status.
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransFailed
transaction failed
@ I2CTransDone
transaction set to done by user level
I2C transaction structure.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.