#include <tim_i2c.h>
|
| enum | STATE {
START,
A_0L,
A_0H,
A_1L,
A_1H,
A_2L,
A_2H,
A_3L,
A_3H,
A_4L,
A_4H,
A_5L,
A_5H,
A_6L,
A_6H,
A_7L,
A_7H,
A_AL,
A_AH,
W_0L,
W_0H,
W_1L,
W_1H,
W_2L,
W_2H,
W_3L,
W_3H,
W_4L,
W_4H,
W_5L,
W_5H,
W_6L,
W_6H,
W_7L,
W_7H,
W_AL,
W_AH,
STOP,
STOP2,
RESTART,
RESTART2,
DUMMY,
R_0L,
R_0H,
R_1L,
R_1H,
R_2L,
R_2H,
R_3L,
R_3H,
R_4L,
R_4H,
R_5L,
R_5H,
R_6L,
R_6H,
R_7L,
R_7H,
R_AL,
R_AH
} |
| |
| typedef enum Soft_I2C::STATE | State |
| |
|
| | Soft_I2C () |
| |
| void | init () |
| |
| void | init_hw (const gpio_dev *scl_dev, uint8_t scl_bit, const gpio_dev *sda_dev, uint8_t sda_bit, const timer_dev *tim) |
| |
| uint8_t | writeBuffer (uint8_t addr_, uint8_t len_, const uint8_t *data) |
| |
| uint8_t | read (uint8_t addr_, uint8_t reg, uint8_t len, uint8_t *buf) |
| |
| uint8_t | transfer (uint8_t addr, uint8_t send_len, const uint8_t *send, uint8_t len, uint8_t *buf) |
| |
| bool | bus_reset (void) |
| |
| void | set_low_speed (bool s) |
| |
Definition at line 15 of file tim_i2c.h.
◆ State
◆ STATE
| Enumerator |
|---|
| START | |
| A_0L | |
| A_0H | |
| A_1L | |
| A_1H | |
| A_2L | |
| A_2H | |
| A_3L | |
| A_3H | |
| A_4L | |
| A_4H | |
| A_5L | |
| A_5H | |
| A_6L | |
| A_6H | |
| A_7L | |
| A_7H | |
| A_AL | |
| A_AH | |
| W_0L | |
| W_0H | |
| W_1L | |
| W_1H | |
| W_2L | |
| W_2H | |
| W_3L | |
| W_3H | |
| W_4L | |
| W_4H | |
| W_5L | |
| W_5H | |
| W_6L | |
| W_6H | |
| W_7L | |
| W_7H | |
| W_AL | |
| W_AH | |
| STOP | |
| STOP2 | |
| RESTART | |
| RESTART2 | |
| DUMMY | |
| R_0L | |
| R_0H | |
| R_1L | |
| R_1H | |
| R_2L | |
| R_2H | |
| R_3L | |
| R_3H | |
| R_4L | |
| R_4H | |
| R_5L | |
| R_5H | |
| R_6L | |
| R_6H | |
| R_7L | |
| R_7H | |
| R_AL | |
| R_AH | |
Definition at line 18 of file tim_i2c.h.
◆ Soft_I2C()
◆ _start()
| bool Soft_I2C::_start |
( |
void |
| ) |
|
|
private |
◆ bus_reset()
| bool Soft_I2C::bus_reset |
( |
void |
| ) |
|
◆ init()
| void Soft_I2C::init |
( |
void |
| ) |
|
◆ init_hw()
| void Soft_I2C::init_hw |
( |
const gpio_dev * |
scl_dev, |
|
|
uint8_t |
scl_bit, |
|
|
const gpio_dev * |
sda_dev, |
|
|
uint8_t |
sda_bit, |
|
|
const timer_dev * |
tim |
|
) |
| |
◆ read()
| uint8_t Soft_I2C::read |
( |
uint8_t |
addr_, |
|
|
uint8_t |
reg, |
|
|
uint8_t |
len, |
|
|
uint8_t * |
buf |
|
) |
| |
◆ set_low_speed()
| void Soft_I2C::set_low_speed |
( |
bool |
s | ) |
|
|
inline |
◆ tick()
| void Soft_I2C::tick |
( |
void |
| ) |
|
|
private |
◆ transfer()
| uint8_t Soft_I2C::transfer |
( |
uint8_t |
addr, |
|
|
uint8_t |
send_len, |
|
|
const uint8_t * |
send, |
|
|
uint8_t |
len, |
|
|
uint8_t * |
buf |
|
) |
| |
◆ wait_done()
| uint8_t Soft_I2C::wait_done |
( |
| ) |
|
|
private |
◆ writeBuffer()
| uint8_t Soft_I2C::writeBuffer |
( |
uint8_t |
addr_, |
|
|
uint8_t |
len_, |
|
|
const uint8_t * |
data |
|
) |
| |
◆ _addr
◆ _scl_bit
| uint8_t Soft_I2C::_scl_bit |
|
private |
◆ _scl_dev
◆ _sda_bit
| uint8_t Soft_I2C::_sda_bit |
|
private |
◆ _sda_dev
◆ _timer
◆ bit_time
| uint16_t Soft_I2C::bit_time |
|
private |
◆ data
◆ done
| volatile bool Soft_I2C::done |
|
private |
◆ f_sda
◆ recv
◆ recv_len
| uint8_t Soft_I2C::recv_len |
|
private |
◆ result
| volatile uint8_t Soft_I2C::result |
|
private |
◆ scl_pin
| uint16_t Soft_I2C::scl_pin |
|
private |
◆ scl_port
| volatile GPIO_TypeDef* Soft_I2C::scl_port |
|
private |
◆ sda_pin
| uint16_t Soft_I2C::sda_pin |
|
private |
◆ sda_port
| volatile GPIO_TypeDef* Soft_I2C::sda_port |
|
private |
◆ send
| const uint8_t* Soft_I2C::send |
|
private |
◆ send_len
| uint8_t Soft_I2C::send_len |
|
private |
◆ state
| volatile State Soft_I2C::state |
|
private |
◆ wait_scl
◆ was_restart
| bool Soft_I2C::was_restart |
|
private |
The documentation for this class was generated from the following files: