49 #define PAL_I2C_EVENT_SUCCESS (0x0000) 50 #define PAL_I2C_EVENT_ERROR (0x0001) 52 #define PAL_I2C_EVENT_BUSY (0x0002) This file provides the prototype declarations of platform abstraction layer.
LIBRARY_EXPORTS pal_status_t pal_i2c_set_bitrate(const pal_i2c_t *p_i2c_context, uint16_t bitrate)
Sets the I2C Master bitrate.
Definition: pal_i2c_arduino.cpp:147
uint8_t slave_address
I2C slave address.
Definition: pal_i2c.h:61
void * upper_layer_event_handler
Pointer to store the callers handler.
Definition: pal_i2c.h:65
LIBRARY_EXPORTS pal_status_t pal_i2c_deinit(const pal_i2c_t *p_i2c_context)
De-initializes the I2C master.
Definition: pal_i2c_arduino.cpp:258
LIBRARY_EXPORTS pal_status_t pal_i2c_init(const pal_i2c_t *p_i2c_context)
Initializes the I2C master.
Definition: pal_i2c_arduino.cpp:132
PAL I2C context structure.
Definition: pal_i2c.h:56
LIBRARY_EXPORTS pal_status_t pal_i2c_write(pal_i2c_t *p_i2c_context, uint8_t *p_data, uint16_t length)
Writes on I2C bus.
Definition: pal_i2c_arduino.cpp:168
LIBRARY_EXPORTS pal_status_t pal_i2c_read(pal_i2c_t *p_i2c_context, uint8_t *p_data, uint16_t length)
Reads from I2C bus.
Definition: pal_i2c_arduino.cpp:206
void * p_upper_layer_ctx
Pointer to store the callers context information.
Definition: pal_i2c.h:63
struct pal_i2c pal_i2c_t
PAL I2C context structure.
void * p_i2c_hw_config
Pointer to I2C master platform specific context.
Definition: pal_i2c.h:59
uint16_t pal_status_t
PAL return status.
Definition: pal.h:60