TT Zephyr Platforms 19.5.0-rc1
Tenstorrent Firmware
Loading...
Searching...
No Matches
i2c_messages.c File Reference

Macros

#define DATA_TOO_LARGE   0x01
#define BYTE_GET(v, b)

Functions

static uint8_t i2c_message_handler (const union request *request, struct response *response)
 Handler for TT_SMC_MSG_I2C_MESSAGE messages.
 REGISTER_MESSAGE (TT_SMC_MSG_I2C_MESSAGE, i2c_message_handler)

Macro Definition Documentation

◆ BYTE_GET

#define BYTE_GET ( v,
b )
Value:
FIELD_GET(0xFFu << ((b) * 8), (v))
#define FIELD_GET(mask, value)

◆ DATA_TOO_LARGE

#define DATA_TOO_LARGE   0x01

Function Documentation

◆ i2c_message_handler()

uint8_t i2c_message_handler ( const union request * request,
struct response * response )
static

Handler for TT_SMC_MSG_I2C_MESSAGE messages.

Performs I2C read/write transactions. The message can contain both write and read operations in a single transaction.

Parameters
requestPointer to the host request message, use request->i2c_message for structured access
responsePointer to the response message to be sent back to host, will contain:
  • Read data if read operation was requested
Returns
0 on success
non-zero on error
See also
i2c_message_rqst_t

◆ REGISTER_MESSAGE()

REGISTER_MESSAGE ( TT_SMC_MSG_I2C_MESSAGE ,
i2c_message_handler  )