stm32_ota/ABM开发板(APP源码)/FreeRTOS版本/APPV3.0/USER/USER_KEY/user_key.h
2024-12-17 20:03:43 +08:00

46 lines
1.6 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __USER_KEY_H
#define __USER_KEY_H
#include <stdint.h>
#include "key.h"
/******************************************************************************
*用户自定义数据类型
*******************************************************************************/
typedef struct
{
uint8_t menuIndex ; // 当前状态索引号
uint8_t keyMenuToIndex ; // 按下“菜单”键时转向的状态索引号
uint8_t keyBackToIndex ; // 按下“退回”键时转向的状态索引号
uint8_t keyUpToIndex ; // 按下“向上”键时转向的状态索引号
uint8_t keyDnToIndex ; // 按下“向下”键时转向的状态索引号
uint8_t keyLeftToIndex ; // 按下“向左”键时转向的状态索引号
uint8_t keyRightToIndex ; // 按下“向右”键时转向的状态索引号
uint8_t keyOkToIndex ; // 按下“OK”键时转向的状态索引号
void (*CurrentOperate)(void) ;// 当前状态应该执行的功能操作
} KbdTab_s ; // 菜单界面参数
/******************************************************************************
*常变量定义
*******************************************************************************/
# define MENU_MAX 55    // 菜单页面总数
extern volatile uint8_t currentMenuIndex ; //记录“当前所处的菜单页”的索引号
extern uint8_t currentKey ;
void Menu_Callback(void) ;
void Back_Callback(void) ;
void KeyUp_Callback(void) ;
void KeyDown_Callback(void) ;
void KeyLeft_Callback(void) ;
void KeyRight_Callback(void) ;
void KeyOk_Callback(void) ;
/*****************************************
*对外接口函数声明
****************************************/
extern void UserKeyInit(void) ;
extern void GetKeylnput(void ) ;
#endif