#ifndef __BSP_BUTTON_H__ #define __BSP_BUTTON_H__ #include "board.h" #include "drv_gpio.h" #ifndef BUTTON_0 #define BUTTON_0 GET_PIN(B, 15)//自检按键 #endif #ifndef BUTTON_1 #define BUTTON_1 GET_PIN(C, 4) //消音按键 #endif // 不然就是用 timer 实现按键扫描处理 #define BUTTON_USE_THREAD #ifdef BUTTON_USE_THREAD #define BUTTON_THREAD_PRIORITY 5 // 优先级拉高,这时按键响应快点 #define BUTTON_THREAD_TICKS 10 #define BUTTON_THREAD_STACK_SIZE 1024 /**< button_thread 线程堆栈大小 */ #endif // !BUTTON_USE_THREAD int BSP_BUTTON_Init(void); #endif //!__BSP_BUTTON_H__