feat(ge_interface): 添加按钮输入功能并优化定时器

- 新增 button4_4 按钮输入模块,实现 4x4 按钮矩阵的扫描和处理
- 添加 ge_timer 模块,提供基本的定时功能
- 优化 ge_render 模块,调整屏幕尺寸的类型
- 修复 init_lcd 函数的定义,使其返回类型为 void
This commit is contained in:
ZZY
2025-06-29 20:46:15 +08:00
parent 52097a36ee
commit d939449267
8 changed files with 192 additions and 6 deletions

View File

@ -0,0 +1,30 @@
#ifndef __BUTTON4_4_H
#define __BUTTON4_4_H
#define KEY_GPIO_CLK RCC_APB2Periph_GPIOC
#define KEY_L1_Pin GPIO_Pin_0
#define KEY_L1_GPIO_Port GPIOC
#define KEY_L2_Pin GPIO_Pin_1
#define KEY_L2_GPIO_Port GPIOC
#define KEY_L3_Pin GPIO_Pin_2
#define KEY_L3_GPIO_Port GPIOC
#define KEY_L4_Pin GPIO_Pin_3
#define KEY_L4_GPIO_Port GPIOC
#define KEY_H1_Pin GPIO_Pin_4
#define KEY_H1_GPIO_Port GPIOC
#define KEY_H2_Pin GPIO_Pin_5
#define KEY_H2_GPIO_Port GPIOC
#define KEY_H3_Pin GPIO_Pin_6
#define KEY_H3_GPIO_Port GPIOC
#define KEY_H4_Pin GPIO_Pin_7
#define KEY_H4_GPIO_Port GPIOC
//#define BTN_GET_BIT(num, pos) ( (num) & ( 1 << (pos) ) )
//#define BTN_SET_TRUE(num, pos) ( (num) |= ( 1 << (pos) ) )
//#define BTN_SET_FALSE(num, pos) ( (num) &= ( ~( 1 << (pos) ) ) )
void Button4_4_Init(void);
int Button4_4_Scan(void);
#endif