Functions | |
| 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_i2c_evt_handler_t. More... | |
| uint16_t | app_i2c_deinit (app_i2c_id_t id) |
| De-initialize the APP I2C DRIVER peripheral. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| i2c_handle_t * | app_i2c_get_handle (app_i2c_id_t id) |
| Return the I2C handle. More... | |
| uint16_t app_i2c_deinit | ( | app_i2c_id_t | id | ) |
De-initialize the APP I2C DRIVER peripheral.
| [in] | id | De-initialize for a specific ID. |
| i2c_handle_t* app_i2c_get_handle | ( | app_i2c_id_t | id | ) |
Return the I2C handle.
| [in] | id | I2C module ID. |
| 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_i2c_evt_handler_t.
| [in] | p_params | Pointer to app_i2c_params_t parameter which contains the configuration information for the specified I2C module. |
| [in] | evt_handler | I2C user callback function. |
| 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.
| [in] | id | I2C module ID. |
| [in] | dev_address | Target device address: The device 7 bits address value in datasheet must be shifted at right before call interface |
| [in] | mem_address | Internal memory address |
| [in] | mem_addr_size | Size of internal memory address |
| [in] | p_data | Pointer to data buffer |
| [in] | size | Amount of data to be sent |
| 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.
| [in] | id | I2C module ID. |
| [in] | dev_address | Target device address: The device 7 bits address value in datasheet must be shifted at right before call interface |
| [in] | mem_address | Internal memory address |
| [in] | mem_addr_size | Size of internal memory address |
| [in] | p_data | Pointer to data buffer |
| [in] | size | Amount of data to be sent |
| [in] | timeout | Timeout duration |
| 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.
| [in] | id | I2C module ID. |
| [in] | dev_address | Target device address: The device 7 bits address value in datasheet must be shifted at right before call interface |
| [in] | mem_address | Internal memory address |
| [in] | mem_addr_size | Size of internal memory address |
| [in] | p_data | Pointer to data buffer |
| [in] | size | Amount of data to be sent |
| 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.
| [in] | id | I2C module ID. |
| [in] | dev_address | Target device address: The device 7 bits address value in datasheet must be shifted at right before call interface |
| [in] | mem_address | Internal memory address |
| [in] | mem_addr_size | Size of internal memory address |
| [in] | p_data | Pointer to data buffer |
| [in] | size | Amount of data to be sent |
| [in] | timeout | Timeout duration |
| 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.
| [in] | id | which I2C module want to receive. |
| [in] | target_address | Target device address: The device 7 bits address value in datasheet must be shifted at right before call interface. |
| [in] | p_data | Pointer to data buffer |
| [in] | size | Amount of data to be sent |
| 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.
| [in] | id | which I2C module want to receive. |
| [in] | target_address | Target device address: The device 7 bits address value in datasheet must be shifted at right before call interface. |
| [in] | p_data | Pointer to data buffer |
| [in] | size | Amount of data to be sent |
| [in] | timeout | Timeout duration |
| 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.
| [in] | id | which I2C module want to transmit. |
| [in] | target_address | Target device address: The device 7 bits address value in datasheet must be shifted at right before call interface. |
| [in] | p_data | Pointer to data buffer |
| [in] | size | Amount of data to be sent |
| 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.
| [in] | id | which I2C module want to transmit. |
| [in] | target_address | Target device address: The device 7 bits address value in datasheet must be shifted at right before call interface. |
| [in] | p_data | Pointer to data buffer |
| [in] | size | Amount of data to be sent |
| [in] | timeout | Timeout duration |