Merge pull request #70 from ropg/I2C_Manager
Replace all LVGL driver I2C code with I2C Manager
This commit is contained in:
commit
a68ce89ff4
24 changed files with 900 additions and 687 deletions
126
lvgl_tft/Kconfig
126
lvgl_tft/Kconfig
|
@ -50,7 +50,7 @@ menu "LVGL TFT Display controller"
|
|||
config LV_PREDEFINED_DISPLAY_WEMOS_LOLIN
|
||||
bool "Wemos Lolin OLED"
|
||||
select LV_TFT_DISPLAY_CONTROLLER_SSD1306
|
||||
select LV_TFT_DISPLAY_PROTOCOL_I2C
|
||||
select LV_I2C_DISPLAY
|
||||
select LV_TFT_DISPLAY_MONOCHROME
|
||||
select LV_THEME_MONO
|
||||
config LV_PREDEFINED_DISPLAY_ATAG
|
||||
|
@ -187,7 +187,7 @@ menu "LVGL TFT Display controller"
|
|||
help
|
||||
Display controller protocol SPI
|
||||
|
||||
config LV_TFT_DISPLAY_PROTOCOL_I2C
|
||||
config LV_I2C_DISPLAY
|
||||
bool
|
||||
help
|
||||
Display controller protocol I2C
|
||||
|
@ -311,7 +311,7 @@ menu "LVGL TFT Display controller"
|
|||
config LV_TFT_DISPLAY_USER_CONTROLLER_SSD1306
|
||||
bool "SSD1306"
|
||||
select LV_TFT_DISPLAY_CONTROLLER_SSD1306
|
||||
select LV_TFT_DISPLAY_PROTOCOL_I2C
|
||||
select LV_I2C_DISPLAY
|
||||
select LV_TFT_DISPLAY_MONOCHROME
|
||||
config LV_TFT_DISPLAY_USER_CONTROLLER_FT81X
|
||||
bool "FT81X"
|
||||
|
@ -502,18 +502,6 @@ menu "LVGL TFT Display controller"
|
|||
depends on LV_TFT_DISPLAY_SPI_TRANS_MODE_SIO
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Display I2C port" if LV_TFT_DISPLAY_PROTOCOL_I2C
|
||||
default LV_DISPLAY_I2C_PORT_0
|
||||
help
|
||||
Select the I2C port used by the display controller.
|
||||
|
||||
config LV_DISPLAY_I2C_PORT_0
|
||||
bool "I2C PORT 0"
|
||||
config LV_DISPLAY_I2C_PORT_1
|
||||
bool "I2C PORT 1"
|
||||
endchoice
|
||||
|
||||
config LV_TFT_USE_CUSTOM_SPI_CLK_DIVIDER
|
||||
bool "Use custom SPI clock frequency." if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
default n
|
||||
|
@ -591,6 +579,16 @@ menu "LVGL TFT Display controller"
|
|||
default 80 if LV_TFT_SPI_CLK_DIVIDER_80
|
||||
default 2
|
||||
|
||||
config LV_M5STICKC_HANDLE_AXP192
|
||||
bool "Handle Backlight and TFT power for M5StickC using AXP192." if LV_PREDEFINED_DISPLAY_M5STICKC || LV_TFT_DISPLAY_CONTROLLER_ST7735S
|
||||
default y if LV_PREDEFINED_DISPLAY_M5STICKC
|
||||
select LV_I2C_DISPLAY
|
||||
help
|
||||
Display and TFT power supply on M5StickC is controlled using an
|
||||
AXP192 Power Mangerment IC. Select yes if you want to enable TFT IC
|
||||
(LDO3) and backlight power using AXP192 by LVGL, or select no if you
|
||||
want to take care of power management in your own code.
|
||||
|
||||
config LV_INVERT_DISPLAY
|
||||
bool "IN DEPRECATION - Invert display." if LV_TFT_DISPLAY_CONTROLLER_RA8875
|
||||
default n
|
||||
|
@ -604,31 +602,6 @@ menu "LVGL TFT Display controller"
|
|||
If the colors look inverted on your display, try enabling this.
|
||||
If it didn't help try LVGL configuration -> Swap the 2 bytes of RGB565 color.
|
||||
|
||||
config LV_M5STICKC_HANDLE_AXP192
|
||||
bool "Handle Backlight and TFT power for M5StickC using AXP192." if LV_PREDEFINED_DISPLAY_M5STICKC || LV_TFT_DISPLAY_CONTROLLER_ST7735S
|
||||
default y if LV_PREDEFINED_DISPLAY_M5STICKC
|
||||
help
|
||||
Display and TFT power supply on M5StickC is controlled using an AXP192 Power Mangerment IC.
|
||||
Select yes if you want to enable TFT IC (LDO3) and backlight power using AXP192 by LVGL, or select no if you want to take care of
|
||||
power management in your own code.
|
||||
|
||||
config LV_AXP192_PIN_SDA
|
||||
int "GPIO for AXP192 I2C SDA"
|
||||
depends on LV_M5STICKC_HANDLE_AXP192
|
||||
range 0 39
|
||||
default 21 if LV_PREDEFINED_DISPLAY_M5STICKC
|
||||
default 21
|
||||
help
|
||||
Configure the AXP192 I2C SDA pin here.
|
||||
|
||||
config LV_AXP192_PIN_SCL
|
||||
int "GPIO for AXP192 I2C SCL"
|
||||
depends on LV_M5STICKC_HANDLE_AXP192
|
||||
range 0 39
|
||||
default 22 if LV_PREDEFINED_DISPLAY_M5STICKC
|
||||
default 22
|
||||
help
|
||||
Configure the AXP192 I2C SDA pin here.
|
||||
|
||||
# menu will be visible only when LV_PREDEFINED_DISPLAY_NONE is y
|
||||
menu "Display RA8875 Configuration"
|
||||
|
@ -770,7 +743,7 @@ menu "LVGL TFT Display controller"
|
|||
config LV_DISP_SPI_MOSI
|
||||
int "GPIO for MOSI (Master Out Slave In)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
default 23 if LV_PREDEFINED_DISPLAY_WROVER4
|
||||
|
@ -800,7 +773,7 @@ menu "LVGL TFT Display controller"
|
|||
int "GPIO for MISO (Master In Slave Out)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
depends on LV_DISPLAY_USE_SPI_MISO
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
default 19 if LV_PREDEFINED_PINS_TKOALA
|
||||
|
@ -846,7 +819,7 @@ menu "LVGL TFT Display controller"
|
|||
config LV_DISP_SPI_CLK
|
||||
int "GPIO for CLK (SCK / Serial Clock)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
default 18 if LV_PREDEFINED_DISPLAY_M5STACK || LV_PREDEFINED_DISPLAY_M5STICK
|
||||
|
@ -875,7 +848,7 @@ menu "LVGL TFT Display controller"
|
|||
int "GPIO for CS (Slave Select)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
depends on LV_DISPLAY_USE_SPI_CS
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
default 5 if LV_PREDEFINED_PINS_38V1
|
||||
|
@ -904,7 +877,7 @@ menu "LVGL TFT Display controller"
|
|||
config LV_DISP_PIN_DC
|
||||
int "GPIO for DC (Data / Command)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
depends on LV_DISPLAY_USE_DC
|
||||
|
@ -942,7 +915,7 @@ menu "LVGL TFT Display controller"
|
|||
int "GPIO for Reset" if LV_TFT_DISPLAY_PROTOCOL_SPI && !LV_DISP_ST7789_SOFT_RESET
|
||||
depends on LV_DISP_USE_RST
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
default 18 if LV_PREDEFINED_PINS_38V1
|
||||
|
@ -964,7 +937,7 @@ menu "LVGL TFT Display controller"
|
|||
config LV_DISP_PIN_BUSY
|
||||
int "GPIO for Busy" if LV_TFT_DISPLAY_CONTROLLER_IL3820 || LV_TFT_DISPLAY_CONTROLLER_JD79653A || LV_TFT_DISPLAY_CONTROLLER_UC8151D
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
default 35 if LV_TFT_DISPLAY_CONTROLLER_IL3820 || LV_TFT_DISPLAY_CONTROLLER_JD79653A || LV_TFT_DISPLAY_CONTROLLER_UC8151D
|
||||
|
@ -1005,7 +978,7 @@ menu "LVGL TFT Display controller"
|
|||
int "GPIO for Backlight Control"
|
||||
depends on LV_ENABLE_BACKLIGHT_CONTROL
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 46 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
default 23 if LV_PREDEFINED_PINS_38V1
|
||||
|
@ -1023,30 +996,39 @@ menu "LVGL TFT Display controller"
|
|||
help
|
||||
Configure the display BCLK (LED) pin here.
|
||||
|
||||
config LV_DISP_PIN_SDA
|
||||
int "GPIO for I2C SDA" if LV_TFT_DISPLAY_PROTOCOL_I2C
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
default 5 if LV_PREDEFINED_DISPLAY_WEMOS_LOLIN
|
||||
default 5
|
||||
|
||||
help
|
||||
Configure the I2C SDA pin here.
|
||||
|
||||
config LV_DISP_PIN_SCL
|
||||
int "GPIO for I2C SCL" if LV_TFT_DISPLAY_PROTOCOL_I2C
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
range 0 21 if IDF_TARGET_ESP32C3
|
||||
|
||||
default 4 if LV_PREDEFINED_DISPLAY_WEMOS_LOLIN
|
||||
default 4
|
||||
|
||||
help
|
||||
Configure the I2C SCL pin here.
|
||||
|
||||
endmenu
|
||||
|
||||
choice
|
||||
prompt "Select an I2C port for the display"
|
||||
default LV_I2C_DISPLAY_PORT_0
|
||||
depends on LV_I2C_DISPLAY
|
||||
|
||||
config LV_I2C_DISPLAY_PORT_0
|
||||
bool
|
||||
prompt "I2C port 0"
|
||||
help
|
||||
I2C is shared peripheral managed by I2C Manager. In order to configure I2C Manager (pinout, etc.) see menu
|
||||
Component config->I2C Port Settings.
|
||||
|
||||
config LV_I2C_DISPLAY_PORT_1
|
||||
bool
|
||||
prompt "I2C port 1"
|
||||
help
|
||||
I2C is shared peripheral managed by I2C Manager. In order to configure I2C Manager (pinout, etc.) see menu
|
||||
Component config->I2C Port Settings.
|
||||
|
||||
endchoice
|
||||
|
||||
config LV_I2C
|
||||
bool
|
||||
default y if LV_I2C_DISPLAY
|
||||
|
||||
config LV_I2C_DISPLAY_PORT
|
||||
int
|
||||
default 1 if LV_I2C_DISPLAY_PORT_1
|
||||
default 0
|
||||
|
||||
endmenu
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,8 @@ extern "C" {
|
|||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
#include "../lvgl_helpers.h"
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
|
|
|
@ -13,10 +13,9 @@
|
|||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "driver/i2c.h"
|
||||
#include "assert.h"
|
||||
|
||||
#include "lvgl_i2c_conf.h"
|
||||
#include "lvgl_i2c/i2c_manager.h"
|
||||
|
||||
#include "ssd1306.h"
|
||||
|
||||
|
@ -25,6 +24,7 @@
|
|||
*********************/
|
||||
#define TAG "SSD1306"
|
||||
|
||||
#define OLED_I2C_PORT (CONFIG_LV_I2C_DISPLAY_PORT)
|
||||
// SLA (0x3C) + WRITE_MODE (0x00) = 0x78 (0b01111000)
|
||||
#define OLED_I2C_ADDRESS 0x3C
|
||||
#define OLED_WIDTH 128
|
||||
|
@ -70,8 +70,6 @@
|
|||
// Charge Pump (pg.62)
|
||||
#define OLED_CMD_SET_CHARGE_PUMP 0x8D // follow with 0x14
|
||||
|
||||
#define OLED_IIC_FREQ_HZ 400000 // I2C colock frequency
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
@ -213,44 +211,15 @@ void ssd1306_sleep_out(void)
|
|||
static uint8_t send_data(lv_disp_drv_t *disp_drv, void *bytes, size_t bytes_len)
|
||||
{
|
||||
(void) disp_drv;
|
||||
esp_err_t err;
|
||||
|
||||
uint8_t *data = (uint8_t *) bytes;
|
||||
|
||||
i2c_cmd_handle_t cmd = i2c_cmd_link_create();
|
||||
|
||||
i2c_master_start(cmd);
|
||||
i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
|
||||
|
||||
for (size_t idx = 0; idx < bytes_len; idx++) {
|
||||
i2c_master_write_byte(cmd, data[idx], true);
|
||||
}
|
||||
|
||||
i2c_master_stop(cmd);
|
||||
|
||||
/* Send queued commands */
|
||||
err = i2c_master_cmd_begin(DISP_I2C_PORT, cmd, 10 / portTICK_PERIOD_MS);
|
||||
i2c_cmd_link_delete(cmd);
|
||||
|
||||
return ESP_OK == err ? 0 : 1;
|
||||
return lvgl_i2c_write(OLED_I2C_PORT, OLED_I2C_ADDRESS, data[0], data + 1, bytes_len - 1 );
|
||||
}
|
||||
|
||||
static uint8_t send_pixels(lv_disp_drv_t *disp_drv, void *color_buffer, size_t buffer_len)
|
||||
{
|
||||
(void) disp_drv;
|
||||
esp_err_t err;
|
||||
|
||||
i2c_cmd_handle_t cmd = i2c_cmd_link_create();
|
||||
i2c_master_start(cmd);
|
||||
i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
|
||||
|
||||
i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_DATA_STREAM, true);
|
||||
i2c_master_write(cmd, (uint8_t *) color_buffer, buffer_len, true);
|
||||
i2c_master_stop(cmd);
|
||||
|
||||
/* Send queued commands */
|
||||
err = i2c_master_cmd_begin(DISP_I2C_PORT, cmd, 10 / portTICK_PERIOD_MS);
|
||||
i2c_cmd_link_delete(cmd);
|
||||
|
||||
return ESP_OK == err ? 0 : 1;
|
||||
return lvgl_i2c_write(OLED_I2C_PORT, OLED_I2C_ADDRESS, OLED_CONTROL_BYTE_DATA_STREAM, color_buffer, buffer_len);
|
||||
}
|
||||
|
|
|
@ -25,8 +25,6 @@ extern "C" {
|
|||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define SSD1306_SDA CONFIG_LV_DISP_PIN_SDA
|
||||
#define SSD1306_SCL CONFIG_LV_DISP_PIN_SCL
|
||||
#define SSD1306_DISPLAY_ORIENTATION TFT_ORIENTATION_LANDSCAPE
|
||||
|
||||
/**********************
|
||||
|
|
|
@ -8,12 +8,15 @@
|
|||
*********************/
|
||||
#include "st7735s.h"
|
||||
#include "disp_spi.h"
|
||||
#include "driver/i2c.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "esp_log.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
||||
#ifdef CONFIG_LV_M5STICKC_HANDLE_AXP192
|
||||
#include "lvgl_i2c/i2c_manager.h"
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
@ -38,7 +41,6 @@ static void st7735s_send_cmd(uint8_t cmd);
|
|||
static void st7735s_send_data(void * data, uint16_t length);
|
||||
static void st7735s_send_color(void * data, uint16_t length);
|
||||
static void st7735s_set_orientation(uint8_t orientation);
|
||||
static void i2c_master_init();
|
||||
static void axp192_write_byte(uint8_t addr, uint8_t data);
|
||||
static void axp192_init();
|
||||
static void axp192_sleep_in();
|
||||
|
@ -60,7 +62,6 @@ uint8_t st7735s_portrait_mode = 0;
|
|||
void st7735s_init(void)
|
||||
{
|
||||
#ifdef CONFIG_LV_M5STICKC_HANDLE_AXP192
|
||||
i2c_master_init();
|
||||
axp192_init();
|
||||
#endif
|
||||
|
||||
|
@ -163,12 +164,16 @@ void st7735s_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * col
|
|||
void st7735s_sleep_in()
|
||||
{
|
||||
st7735s_send_cmd(0x10);
|
||||
axp192_sleep_in();
|
||||
#ifdef CONFIG_LV_M5STICKC_HANDLE_AXP192
|
||||
axp192_sleep_in();
|
||||
#endif
|
||||
}
|
||||
|
||||
void st7735s_sleep_out()
|
||||
{
|
||||
axp192_sleep_out();
|
||||
#ifdef CONFIG_LV_M5STICKC_HANDLE_AXP192
|
||||
axp192_sleep_out();
|
||||
#endif
|
||||
st7735s_send_cmd(0x11);
|
||||
}
|
||||
|
||||
|
@ -218,55 +223,35 @@ static void st7735s_set_orientation(uint8_t orientation)
|
|||
st7735s_send_data((void *) &data[orientation], 1);
|
||||
}
|
||||
|
||||
static void i2c_master_init()
|
||||
{
|
||||
i2c_config_t i2c_config = {
|
||||
.mode = I2C_MODE_MASTER,
|
||||
.sda_io_num = AXP192_SDA,
|
||||
.scl_io_num = AXP192_SCL,
|
||||
.sda_pullup_en = GPIO_PULLUP_ENABLE,
|
||||
.scl_pullup_en = GPIO_PULLUP_ENABLE,
|
||||
.master.clk_speed = 400000
|
||||
};
|
||||
i2c_param_config(I2C_NUM_0, &i2c_config);
|
||||
i2c_driver_install(I2C_NUM_0, I2C_MODE_MASTER, 0, 0, 0);
|
||||
}
|
||||
#ifdef CONFIG_LV_M5STICKC_HANDLE_AXP192
|
||||
|
||||
static void axp192_write_byte(uint8_t addr, uint8_t data)
|
||||
{
|
||||
esp_err_t ret;
|
||||
i2c_cmd_handle_t cmd = i2c_cmd_link_create();
|
||||
static void axp192_write_byte(uint8_t addr, uint8_t data)
|
||||
{
|
||||
err = lvgl_i2c_write(CONFIG_LV_I2C_DISPLAY_PORT, AXP192_I2C_ADDRESS, addr, &data, 1);
|
||||
if (ret != ESP_OK) {
|
||||
ESP_LOGE(TAG, "AXP192 send failed. code: 0x%.2X", ret);
|
||||
}
|
||||
}
|
||||
|
||||
i2c_master_start(cmd);
|
||||
i2c_master_write_byte(cmd, (AXP192_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
|
||||
i2c_master_write_byte(cmd, addr, true);
|
||||
i2c_master_write_byte(cmd, data, true);
|
||||
i2c_master_stop(cmd);
|
||||
static void axp192_init()
|
||||
{
|
||||
// information on how to init and use AXP192 ifor M5StickC taken from
|
||||
// https://forum.m5stack.com/topic/1025/m5stickc-turn-off-screen-completely
|
||||
|
||||
ret = i2c_master_cmd_begin(I2C_NUM_0, cmd, 10/portTICK_PERIOD_MS);
|
||||
if (ret != ESP_OK) {
|
||||
ESP_LOGE(TAG, "AXP192 send failed. code: 0x%.2X", ret);
|
||||
}
|
||||
i2c_cmd_link_delete(cmd);
|
||||
}
|
||||
axp192_write_byte(0x10, 0xFF); // OLED_VPP Enable
|
||||
axp192_write_byte(0x28, 0xCC); // Enable LDO2&LDO3, LED&TFT 3.0V
|
||||
axp192_sleep_out();
|
||||
ESP_LOGI(TAG, "AXP192 initialized, power enabled for LDO2 and LDO3");
|
||||
}
|
||||
|
||||
static void axp192_init()
|
||||
{
|
||||
// information on how to init and use AXP192 ifor M5StickC taken from
|
||||
// https://forum.m5stack.com/topic/1025/m5stickc-turn-off-screen-completely
|
||||
static void axp192_sleep_in()
|
||||
{
|
||||
axp192_write_byte(0x12, 0x4b);
|
||||
}
|
||||
|
||||
axp192_write_byte(0x10, 0xFF); // OLED_VPP Enable
|
||||
axp192_write_byte(0x28, 0xCC); // Enable LDO2&LDO3, LED&TFT 3.0V
|
||||
axp192_sleep_out();
|
||||
ESP_LOGI(TAG, "AXP192 initialized, power enabled for LDO2 and LDO3");
|
||||
}
|
||||
static void axp192_sleep_out()
|
||||
{
|
||||
axp192_write_byte(0x12, 0x4d);
|
||||
}
|
||||
|
||||
static void axp192_sleep_in()
|
||||
{
|
||||
axp192_write_byte(0x12, 0x4b);
|
||||
}
|
||||
|
||||
static void axp192_sleep_out()
|
||||
{
|
||||
axp192_write_byte(0x12, 0x4d);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -29,9 +29,6 @@ extern "C" {
|
|||
#define ST7735S_RST CONFIG_LV_DISP_PIN_RST
|
||||
#define ST7735S_USE_RST CONFIG_LV_DISP_USE_RST
|
||||
|
||||
#define AXP192_SDA CONFIG_LV_AXP192_PIN_SDA
|
||||
#define AXP192_SCL CONFIG_LV_AXP192_PIN_SCL
|
||||
|
||||
#define ST7735S_INVERT_COLORS CONFIG_LV_INVERT_COLORS
|
||||
|
||||
// Defines are taken from
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue