Go to the documentation of this file.
58 #ifdef ENV_USE_FREERTOS
66 #ifdef HAL_I2C_MODULE_ENABLED
351 #ifdef ENV_RTOS_USE_SEMP
366 uint16_t app_i2c_receive_sem_sync(
app_i2c_id_t id, uint16_t target_address, uint8_t *p_data, uint16_t size);
381 uint16_t app_i2c_transmit_sem_sync(
app_i2c_id_t id, uint16_t target_address, uint8_t *p_data, uint16_t size);
I2C IO configuration Structures.
I2C operate mode Enumerations definition.
app_i2c_pin_t sda
Set the configuration of I2C SDA pin.
uint32_t pin
Specifies the IO pins to be configured.
dma_channel_t rx_dma_channel
Specifies the dma channel of I2C RX.
@ APP_I2C_EVT_ERROR
Error reported by I2C peripheral.
uint32_t error_code
I2C Error code .
app_i2c_type_t type
Specifies the operation mode of I2C.
@ APP_I2C_TYPE_MAX
Only for check parameter, not used as input parameters.
uint16_t app_i2c_receive_async(app_i2c_id_t id, uint16_t target_address, uint8_t *p_data, uint16_t size)
Receive in master or slave mode an amount of data in non-blocking mode with Interrupt/DMA.
I2C Configuration Structure definition.
@ APP_I2C_ROLE_MASTER
I2C master device.
I2C handle Structure definition.
app_io_pull_t
GPIO pull Enumerations definition.
app_io_type_t
GPIO type Enumerations definition.
@ APP_I2C_TYPE_POLLING
Polling operation mode
uint16_t app_i2c_transmit_sync(app_i2c_id_t id, uint16_t target_address, uint8_t *p_data, uint16_t size, uint32_t timeout)
Transmits in master or slave mode an amount of data in blocking mode.
uint16_t size
I2C transmitted/received counter.
uint16_t app_i2c_deinit(app_i2c_id_t id)
De-initialize the APP I2C DRIVER peripheral.
app_io_mux_t mux
Specifies the Peripheral to be connected to the selected pins.
dma_channel_t tx_dma_channel
Specifies the dma channel of I2C TX.
app_io_type_t type
Specifies the type of SPI IO.
Header file containing functions prototypes of GPIO app library.
@ APP_I2C_ROLE_MAX
Only for check parameter, not used as input parameters.
app_i2c_role_t
I2C role Enumerations definition.
uint16_t app_i2c_mem_read_sync(app_i2c_id_t id, uint16_t dev_address, uint16_t mem_address, uint16_t mem_addr_size, uint8_t *p_data, uint16_t size, uint32_t timeout)
Read an amount of data in blocking mode from a specific memory address.
app_i2c_id_t id
specified I2C module ID.
@ APP_I2C_TYPE_INTERRUPT
Interrupt operation mode.
app_i2c_id_t
I2C module Enumerations definition.
app_i2c_pin_cfg_t pin_cfg
the pin configuration information for the specified I2C module.
app_i2c_role_t role
specified the role of I2C.
uint16_t app_i2c_mem_read_async(app_i2c_id_t id, uint16_t dev_address, uint16_t mem_address, uint16_t mem_addr_size, uint8_t *p_data, uint16_t size)
Read an amount of data in non-blocking mode with Interrupt/DMA from a specific memory address.
uint16_t app_i2c_receive_sync(app_i2c_id_t id, uint16_t target_address, uint8_t *p_data, uint16_t size, uint32_t timeout)
Receive in master or slave mode an amount of data in blocking mode.
app_i2c_evt_type_t
I2C event Enumerations definition.
@ APP_I2C_ID_1
I2C module 1.
I2C event structure definition.
app_i2c_pin_t scl
Set the configuration of I2C SCL pin.
i2c_handle_t * app_i2c_get_handle(app_i2c_id_t id)
Return the I2C handle.
This file contains all the functions prototypes for the HAL module driver.
uint16_t app_i2c_transmit_async(app_i2c_id_t id, uint16_t target_address, uint8_t *p_data, uint16_t size)
Transmits in master or slave mode an amount of data in non-blocking mode with Interrupt/DMA.
app_io_pull_t pull
Specifies the Pull-up or Pull-Down activation for the selected pins.
@ APP_I2C_EVT_TX_CPLT
Requested TX transfer completed.
uint16_t app_i2c_init(app_i2c_params_t *p_params, app_i2c_evt_handler_t evt_handler)
Initialize the APP I2C DRIVER according to the specified parameters in the app_i2c_params_t and app_i...
void(* app_i2c_evt_handler_t)(app_i2c_evt_t *p_evt)
I2C event callback definition.
app_i2c_type_t
I2C operating mode Enumerations definition.
app_io_mux_t
GPIO mux Enumerations definition.
@ APP_I2C_EVT_RX_DATA
Requested RX transfer completed.
app_i2c_evt_type_t type
Type of event.
I2C parameters structure definition.
Header file of app rtos config code.
Header file of app driver error code.
i2c_init_t init
I2C communication parameters.
@ APP_I2C_TYPE_DMA
DMA operation mode
uint16_t app_i2c_mem_write_sync(app_i2c_id_t id, uint16_t dev_address, uint16_t mem_address, uint16_t mem_addr_size, uint8_t *p_data, uint16_t size, uint32_t timeout)
Write an amount of data in blocking mode to a specific memory address.
@ APP_I2C_ID_0
I2C module 0.
uint16_t app_i2c_mem_write_async(app_i2c_id_t id, uint16_t dev_address, uint16_t mem_address, uint16_t mem_addr_size, uint8_t *p_data, uint16_t size)
Write an amount of data in non-blocking mode with Interrupt/DMA to a specific memory address.
app_i2c_mode_t use_mode
I2C operate mode.
@ APP_I2C_ID_MAX
Only for check parameter, not used as input parameters.
dma_channel_t
HAL DMA Channel Enumerations definition.
@ APP_I2C_ROLE_SLAVE
I2C slave device.