Add INMP441 sound-level meter for CYD 2.8/3.5.
I2S mic on WS22/SCK27(SD35) with LVGL dB gauge, peak/min-max and firmware pack. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
86
include/lv_conf.h
Normal file
86
include/lv_conf.h
Normal file
@@ -0,0 +1,86 @@
|
||||
#ifndef LV_CONF_H
|
||||
#define LV_CONF_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define LV_COLOR_DEPTH 16
|
||||
|
||||
#define LV_MEM_SIZE (48 * 1024U)
|
||||
#define LV_DEF_REFR_PERIOD 16
|
||||
#define LV_DPI_DEF 130
|
||||
|
||||
/* ESP32 无 Helium,关掉以免 .S 汇编被错误预处理 */
|
||||
#define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_NONE
|
||||
|
||||
#define LV_USE_OS LV_OS_NONE
|
||||
#define LV_USE_STDLIB_MALLOC LV_STDLIB_BUILTIN
|
||||
#define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN
|
||||
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN
|
||||
|
||||
#define LV_USE_LOG 0
|
||||
#define LV_USE_ASSERT_NULL 1
|
||||
#define LV_USE_ASSERT_MALLOC 1
|
||||
|
||||
#define LV_FONT_MONTSERRAT_12 1
|
||||
#define LV_FONT_MONTSERRAT_14 1
|
||||
#define LV_FONT_MONTSERRAT_16 1
|
||||
#define LV_FONT_MONTSERRAT_20 1
|
||||
#define LV_FONT_MONTSERRAT_24 1
|
||||
#define LV_FONT_MONTSERRAT_28 1
|
||||
#define LV_FONT_MONTSERRAT_32 1
|
||||
#define LV_FONT_MONTSERRAT_40 1
|
||||
#define LV_FONT_DEFAULT &lv_font_montserrat_14
|
||||
|
||||
#define LV_USE_FLOAT 1
|
||||
#define LV_USE_MATRIX 0
|
||||
|
||||
#define LV_USE_LABEL 1
|
||||
#define LV_LABEL_TEXT_SELECTION 0
|
||||
#define LV_LABEL_LONG_TXT_HINT 1
|
||||
|
||||
#define LV_USE_ARC 1
|
||||
#define LV_USE_BAR 1
|
||||
#define LV_USE_BTN 1
|
||||
#define LV_USE_BUTTON 1
|
||||
#define LV_USE_IMG 1
|
||||
#define LV_USE_IMAGE 1
|
||||
#define LV_USE_LINE 1
|
||||
#define LV_USE_SLIDER 1
|
||||
#define LV_USE_SWITCH 1
|
||||
#define LV_USE_TEXTAREA 0
|
||||
#define LV_USE_CHECKBOX 0
|
||||
#define LV_USE_DROPDOWN 0
|
||||
#define LV_USE_ROLLER 0
|
||||
#define LV_USE_TABLE 0
|
||||
#define LV_USE_CALENDAR 0
|
||||
#define LV_USE_CHART 1
|
||||
#define LV_USE_KEYBOARD 0
|
||||
#define LV_USE_LIST 0
|
||||
#define LV_USE_MENU 0
|
||||
#define LV_USE_MSGBOX 0
|
||||
#define LV_USE_SPAN 0
|
||||
#define LV_USE_SPINBOX 0
|
||||
#define LV_USE_SPINNER 1
|
||||
#define LV_USE_TABVIEW 0
|
||||
#define LV_USE_TILEVIEW 0
|
||||
#define LV_USE_WIN 0
|
||||
#define LV_USE_LED 1
|
||||
#define LV_USE_SCALE 1
|
||||
|
||||
#define LV_USE_THEME_DEFAULT 1
|
||||
#define LV_THEME_DEFAULT_DARK 1
|
||||
#define LV_THEME_DEFAULT_GROW 0
|
||||
#define LV_THEME_DEFAULT_TRANSITION_TIME 80
|
||||
|
||||
#define LV_USE_FLEX 1
|
||||
#define LV_USE_GRID 1
|
||||
|
||||
#define LV_USE_TFT_ESPI 1
|
||||
|
||||
#define LV_USE_OBSERVER 0
|
||||
#define LV_USE_SYSMON 0
|
||||
#define LV_USE_PROFILER 0
|
||||
#define LV_USE_DEMO_WIDGETS 0
|
||||
#define LV_USE_DEMO_BENCHMARK 0
|
||||
|
||||
#endif /* LV_CONF_H */
|
||||
21
include/pins.h
Normal file
21
include/pins.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
/* CYD + INMP441 I2S pin truth source — see ../CYD_PROJECT_GUIDE.md */
|
||||
|
||||
#if defined(CYD_BOARD_3248S035)
|
||||
/* 3.5C ESP32-3248S035C: BL=27; free peripheral pair is 22+21 */
|
||||
#define TFT_BL_PIN 27
|
||||
#define I2S_WS_PIN 22
|
||||
#define I2S_SCK_PIN 21
|
||||
#define I2S_SD_PIN 35
|
||||
#define SCREEN_WIDTH 480
|
||||
#define SCREEN_HEIGHT 320
|
||||
#else
|
||||
/* 2.8 ESP32-2432S028R: BL=21; free peripheral pair is 22+27; SD on P3 IO35 */
|
||||
#define TFT_BL_PIN 21
|
||||
#define I2S_WS_PIN 22
|
||||
#define I2S_SCK_PIN 27
|
||||
#define I2S_SD_PIN 35
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
#endif
|
||||
6
include/touch.h
Normal file
6
include/touch.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
void touch_init();
|
||||
void touch_read_cb(lv_indev_t *indev, lv_indev_data_t *data);
|
||||
Reference in New Issue
Block a user