Trident IoT SDK
Loading...
Searching...
No Matches
tr_hal_i2c.h
Go to the documentation of this file.
1
10
11#ifndef TR_HAL_I2C_H_
12#define TR_HAL_I2C_H_
13
14#include "tr_hal_platform.h"
15
16
17// ****************************************************************************
18// I2C Driver API functions
19// ****************************************************************************
20
21
22// ****************************************************************************
23// API for I2C Controller (what used to be called I2C Master)
24// ****************************************************************************
25
32 tr_hal_i2c_settings_t* i2c_settings);
33
37
38
41 tr_hal_i2c_settings_t* i2c_settings);
42
51 uint8_t target_address,
52 uint8_t* bytes_to_send,
53 uint16_t num_bytes_to_send,
54 uint16_t num_bytes_to_read);
55
57#define tr_hal_i2c_transmit(i2c_id, target_address, bytes_to_send, num_bytes_to_send) \
58 tr_hal_i2c_tx_rx(i2c_id, target_address, bytes_to_send, num_bytes_to_send, 0)
59
61#define tr_hal_i2c_receive(i2c_id, target_address, num_bytes_to_read) \
62 tr_hal_i2c_tx_rx(i2c_id, target_address, NULL, 0, num_bytes_to_read)
63
65 tr_hal_i2c_int_count_t* int_count);
66
67#endif //TR_HAL_SPI_H_
tr_hal_i2c_id_t
On the T32CM11 there is just 1 I2C available to act as a Controller.
Definition T32CM11_i2c.h:43
tr_hal_status_t
Definition tr_hal_common.h:25
Definition T32CM11_i2c.h:304
Definition T32CM11_i2c.h:250
tr_hal_status_t tr_hal_i2c_uninit(tr_hal_i2c_id_t i2c_id)
tr_hal_status_t tr_hal_i2c_init(tr_hal_i2c_id_t i2c_id, tr_hal_i2c_settings_t *i2c_settings)
tr_hal_status_t tr_hal_i2c_tx_rx(tr_hal_i2c_id_t i2c_id, uint8_t target_address, uint8_t *bytes_to_send, uint16_t num_bytes_to_send, uint16_t num_bytes_to_read)
tr_hal_status_t tr_hal_i2c_read_settings(tr_hal_i2c_id_t i2c_id, tr_hal_i2c_settings_t *i2c_settings)
this loads the current I2C settings into the i2c_settings passed in
tr_hal_status_t tr_hal_i2c_read_interrupt_counters(tr_hal_i2c_id_t i2c_id, tr_hal_i2c_int_count_t *int_count)