Kestrel Interface
Loading...
Searching...
No Matches
kest_i2c.h File Reference
#include <stdint.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define I2C_MASTER_SCL_IO   7
#define I2C_MASTER_SDA_IO   8
#define I2C_MASTER_NUM   0
#define I2C_MASTER_FREQ_HZ   100000
#define I2C_MASTER_TX_BUF_DISABLE   0
#define I2C_MASTER_RX_BUF_DISABLE   0
#define I2C_MASTER_TIMEOUT_MS   10

Functions

esp_err_t i2c_master_init ()
int i2c_transmit_persistent (uint8_t addr, uint8_t *buf, int n, int retries)
int i2c_transmit (uint8_t addr, uint8_t *buf, int n)
int i2c_receive (uint8_t addr, uint8_t *buf, int n)

Variables

SemaphoreHandle_t i2c_mutex

Macro Definition Documentation

◆ I2C_MASTER_FREQ_HZ

#define I2C_MASTER_FREQ_HZ   100000

Definition at line 9 of file kest_i2c.h.

◆ I2C_MASTER_NUM

#define I2C_MASTER_NUM   0

Definition at line 8 of file kest_i2c.h.

◆ I2C_MASTER_RX_BUF_DISABLE

#define I2C_MASTER_RX_BUF_DISABLE   0

Definition at line 11 of file kest_i2c.h.

◆ I2C_MASTER_SCL_IO

#define I2C_MASTER_SCL_IO   7

Definition at line 6 of file kest_i2c.h.

◆ I2C_MASTER_SDA_IO

#define I2C_MASTER_SDA_IO   8

Definition at line 7 of file kest_i2c.h.

◆ I2C_MASTER_TIMEOUT_MS

#define I2C_MASTER_TIMEOUT_MS   10

Definition at line 12 of file kest_i2c.h.

◆ I2C_MASTER_TX_BUF_DISABLE

#define I2C_MASTER_TX_BUF_DISABLE   0

Definition at line 10 of file kest_i2c.h.

Function Documentation

◆ i2c_master_init()

esp_err_t i2c_master_init ( )

◆ i2c_receive()

int i2c_receive ( uint8_t addr,
uint8_t * buf,
int n )

◆ i2c_transmit()

int i2c_transmit ( uint8_t addr,
uint8_t * buf,
int n )

◆ i2c_transmit_persistent()

int i2c_transmit_persistent ( uint8_t addr,
uint8_t * buf,
int n,
int retries )

Variable Documentation

◆ i2c_mutex

SemaphoreHandle_t i2c_mutex
extern

Referenced by i2c_receive().