From 460f2fb27c9a552f664d0011eca225d7cd169ab1 Mon Sep 17 00:00:00 2001 From: jarvis Date: Wed, 12 Mar 2025 19:00:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E6=BA=90=E9=94=AE=E6=81=AF=E5=B1=8F?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=81=9A=E4=BA=86=E9=83=A8=E5=88=86=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/FluxButton/FluxButton.h | 2 ++ components/FluxPower/FluxPower.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/components/FluxButton/FluxButton.h b/components/FluxButton/FluxButton.h index add3c97..1777513 100644 --- a/components/FluxButton/FluxButton.h +++ b/components/FluxButton/FluxButton.h @@ -27,6 +27,8 @@ enum button_cmd_t BUTTON_CMD_CENTER_KEY=2, BUTTON_CMD_LEFT_KEY=3, BUTTON_CMD_RIGHT_KEY=4, + BUTTON_CMD_LCD_CLOSE=5, + BUTTON_CMD_LCD_OPEN=6, }; #define CONFIG_GPIO_BUTTON_SUPPORT_POWER_SAVE 0 diff --git a/components/FluxPower/FluxPower.h b/components/FluxPower/FluxPower.h index 0608b9c..5faa1e2 100644 --- a/components/FluxPower/FluxPower.h +++ b/components/FluxPower/FluxPower.h @@ -12,6 +12,12 @@ #include "esp_adc/adc_cali_scheme.h" #include "ui.h" +#define CLOSE_LCD_BACKLIGHT ESP_ERROR_CHECK(ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, 9192));\ + ESP_ERROR_CHECK(ledc_update_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0)); + +#define OPEN_LCD_BACKLIGHT ESP_ERROR_CHECK(ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, 100));\ + ESP_ERROR_CHECK(ledc_update_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0)); + /*配置ADC采用通道*/ #define EXAMPLE_ADC1_CHAN8 ADC_CHANNEL_8 /*配置用于进行ADC采样的引脚*/