|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
#include <cstring>#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include "driver/gpio.h"#include "esp_log.h"#include "sdkconfig.h"#include "i2c_driver.h"Go to the source code of this file.
Macros | |
| #define | I2C_MASTER_NUM (i2c_port_t)CONFIG_I2C_MASTER_PORT_NUM |
| #define | I2C_MASTER_SDA_IO (gpio_num_t)CONFIG_SENSOR_SDA |
| #define | I2C_MASTER_SCL_IO (gpio_num_t)CONFIG_SENSOR_SCL |
| #define | I2C_MASTER_FREQ_HZ CONFIG_I2C_MASTER_FREQUENCY |
| #define | I2C_MASTER_TX_BUF_DISABLE 0 |
| #define | I2C_MASTER_RX_BUF_DISABLE 0 |
Functions | |
| esp_err_t | i2c_drv_init (void) |
| i2c master initialization | |
| void | i2c_drv_scan () |
| bool | i2c_drv_probe (uint8_t devAddr) |
| #define I2C_MASTER_FREQ_HZ CONFIG_I2C_MASTER_FREQUENCY |
I2C master clock frequency
Definition at line 43 of file esp_idf_touch/main/i2c_driver.cpp.
| #define I2C_MASTER_NUM (i2c_port_t)CONFIG_I2C_MASTER_PORT_NUM |
Definition at line 40 of file esp_idf_touch/main/i2c_driver.cpp.
| #define I2C_MASTER_RX_BUF_DISABLE 0 |
I2C master doesn't need buffer
Definition at line 45 of file esp_idf_touch/main/i2c_driver.cpp.
| #define I2C_MASTER_SCL_IO (gpio_num_t)CONFIG_SENSOR_SCL |
Definition at line 42 of file esp_idf_touch/main/i2c_driver.cpp.
| #define I2C_MASTER_SDA_IO (gpio_num_t)CONFIG_SENSOR_SDA |
Definition at line 41 of file esp_idf_touch/main/i2c_driver.cpp.
| #define I2C_MASTER_TX_BUF_DISABLE 0 |
I2C master doesn't need buffer
Definition at line 44 of file esp_idf_touch/main/i2c_driver.cpp.
| esp_err_t i2c_drv_init | ( | void | ) |
i2c master initialization
Definition at line 174 of file esp_idf_touch/main/i2c_driver.cpp.
References I2C_MASTER_FREQ_HZ, I2C_MASTER_NUM, I2C_MASTER_RX_BUF_DISABLE, I2C_MASTER_SCL_IO, I2C_MASTER_SDA_IO, and I2C_MASTER_TX_BUF_DISABLE.
Referenced by app_main().
| bool i2c_drv_probe | ( | uint8_t | devAddr | ) |
Definition at line 261 of file esp_idf_touch/main/i2c_driver.cpp.
References cmd, and I2C_MASTER_NUM.
Referenced by touch_drv_init().
| void i2c_drv_scan | ( | ) |
Definition at line 208 of file esp_idf_touch/main/i2c_driver.cpp.
References cmd, i, and I2C_MASTER_NUM.
Referenced by app_main(), and touch_drv_init().