puzzlebox
Loading...
Searching...
No Matches
I²C

I²C abstraction functions. More...

Detailed Description

Functions

void i2c_send (uint16_t addr, const char *data, size_t data_size)
 Fake I²C send function.
 
void i2c_dump (const i2ctcp_msg_t *msg)
 Handle received (main -> client) I²C messages.
 

Function Documentation

◆ i2c_dump()

void i2c_dump ( const i2ctcp_msg_t * msg)

This function is called for I²C messages both sent and received by the main controller. This function tries to distinguish between sent/received messages by parsing the message data as a puzzle bus message and checking if the msg->sender field is equal to the main controller bus address.

Parameters
msgTransferred message

◆ i2c_send()

void i2c_send ( uint16_t addr,
const char * data,
size_t data_size )

This function sends an I²C message to the main controller over TCP using i2ctcp.

Parameters
addrI²C address
dataData to send
data_sizesize of data