Go to the documentation of this file.
68 #ifdef HAL_I2C_MODULE_ENABLED
81 #if (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5526X) || (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5525X)
85 #if (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5526X)
173 #ifdef APP_DRIVER_WAKEUP_CALL_FUN
438 #if (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR551X)
I2C pins config Structures.
uint16_t app_i2c_timing_get(app_i2c_id_t id, uint32_t timing_type, uint32_t *p_timing_value)
Get I2C timing value.
app_i2c_pin_t sda
Set the configuration of I2C SDA pin.
app_i2c_state_t
App i2c state types.
uint32_t pin
Specifies the IO pins to be configured.
@ APP_I2C_EVT_ERROR
Error reported by I2C peripheral.
uint32_t error_code
I2C Error code.
app_i2c_dma_cfg_t dma_cfg
I2C operate mode.
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.
i2c_env_t i2c_dev
I2C device structure definition.
@ APP_I2C_ROLE_MASTER
I2C master device.
app_i2c_state_t i2c_state
I2C state types.
I2C handle Structure definition.
app_io_pull_t
GPIO pull Enumerations definition.
app_io_type_t
GPIO type Enumerations definition.
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.
dma_regs_t * rx_dma_instance
Specifies the RX DMA instance.
uint16_t app_i2c_master_abort_it(app_i2c_id_t id)
Abort a master I2C IT or DMA process communication with Interrupt.
uint16_t size
I2C transmitted/received counter.
uint16_t app_i2c_deinit(app_i2c_id_t id)
De-initialize the APP I2C DRIVER peripheral.
I2C device structure definition.
i2c_handle_t handle
I2C handle definition.
dma_channel_t rx_dma_channel
Specifies the dma channel of I2C RX.
app_io_mux_t mux
Specifies the Peripheral to be connected to the selected pins.
uint16_t app_i2c_timing_adjust(app_i2c_id_t id, uint32_t timing_type, int32_t delta)
Adjust I2C timing value to adapt to real load.
dma_regs_t * tx_dma_instance
Specifies the TX DMA instance.
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.
volatile bool start_flag
Start flag definition.
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_id_t
I2C module Enumerations definition.
void(* app_i2c_evt_handler_t)(app_i2c_evt_t *p_evt)
I2C event callback definition.
I2C operate mode Enumerations definition.
uint16_t slv_dev_addr
I2C Slave address.
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.
app_i2c_role_t role
I2C role Enumerations definition.
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.
This file contains all the functions prototypes for the HAL module driver.
app_i2c_evt_type_t
I2C event Enumerations definition.
@ APP_I2C_ABORT
abort reported by I2C peripheral.
uint16_t app_i2c_transmit_receive_sync(app_i2c_id_t id, uint16_t dev_address, uint8_t *p_tdata, uint16_t tsize, uint8_t *p_rdata, uint16_t rsize, uint32_t timeout)
Transmits than receives in master mode or receives than transmits in slave mode with only one stop bi...
@ APP_I2C_ID_1
I2C module 1.
I2C event structure definition.
app_i2c_pin_t scl
Set the configuration of I2C SCL pin.
app_i2c_pin_cfg_t * p_pin_cfg
I2C pins config Structures.
app_i2c_dma_state_t i2c_dma_state
I2C dma state types.
i2c_handle_t * app_i2c_get_handle(app_i2c_id_t id)
Return the I2C handle.
Header file containing functions prototypes of DMA app library.
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...
app_io_mux_t
GPIO mux Enumerations definition.
uint16_t slave_addr
I2C slave address.
dma_channel_t tx_dma_channel
Specifies the dma channel of I2C TX.
@ 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 driver error code.
Header file of app driver config code.
i2c_init_t init
I2C communication parameters.
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_dma_state_t
App i2c dma state types.
@ APP_I2C_ID_0
I2C module 0.
int16_t dma_id_t
DMA id definition.
app_i2c_evt_handler_t evt_handler
I2C event callback definition.
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_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.