LCD 1602 Driver with ESP32 I2C 1.1
This is a complete driver for LCD 1602 using I2C with the ESP32
Loading...
Searching...
No Matches
lcd_i2c.h
Go to the documentation of this file.
1#ifndef LCD_I2C_H_
2#define LCD_I2C_H_
3
4#include <stdio.h>
5#include "sdkconfig.h"
6#include "freertos/FreeRTOS.h"
7#include "freertos/task.h"
8#include "esp_log.h"
9#include "driver/i2c_master.h"
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#define I2C_MASTER_SCL_IO GPIO_NUM_2
16#define I2C_MASTER_SDA_IO GPIO_NUM_3
17#define I2C_MASTER_NUM I2C_NUM_0
18#define I2C_MASTER_FREQ_HZ 100000
19#define I2C_MASTER_TX_BUF_DISABLE 0
20#define I2C_MASTER_RX_BUF_DISABLE 0
21#define I2C_MASTER_TIMEOUT_MS 1000
22#define I2C_DEVICE_ADDRESS_LEN I2C_ADDR_BIT_LEN_7
23
33uint8_t i2c_open(i2c_master_bus_handle_t *bus_handle, i2c_master_dev_handle_t *dev_handle, const uint8_t address);
34
35#ifdef __cplusplus
36extern "C" }
37#endif
38
39#endif
uint8_t i2c_open(i2c_master_bus_handle_t *bus_handle, i2c_master_dev_handle_t *dev_handle, const uint8_t address)
initializes the i2c communications and points the handles to correctly initialized variables on the h...
Definition lcd_i2c.c:3