Microchip® Advanced Software Framework

i2c_master_packet Struct Reference

I2C master packet for read/write.

Structure to be used when transferring I2C master packets.

#include <i2c_master.h>

Data Fields

uint16_t address
 Address to slave device. More...
 
uint8_t * data
 Data array containing all data to be transferred. More...
 
uint16_t data_length
 Length of data array. More...
 
bool high_speed
 Use high speed transfer. More...
 
uint8_t hs_master_code
 High speed mode master code (0000 1XXX), valid when high_speed is true. More...
 
bool ten_bit_address
 Use 10-bit addressing. More...
 

uint16_t i2c_master_packet::address
uint8_t* i2c_master_packet::data
uint16_t i2c_master_packet::data_length
bool i2c_master_packet::high_speed

Use high speed transfer.

Set to false if the feature is not supported by the device

Referenced by _i2c_master_read_packet(), and _i2c_master_write_packet().

uint8_t i2c_master_packet::hs_master_code

High speed mode master code (0000 1XXX), valid when high_speed is true.

Referenced by _i2c_master_read_packet(), and _i2c_master_write_packet().

bool i2c_master_packet::ten_bit_address

Use 10-bit addressing.

Set to false if the feature is not supported by the device

Referenced by _i2c_master_read_packet(), and _i2c_master_write_packet().