stm32_ota/USER/USER_KEY/user_key.h

46 lines
1.6 KiB
C
Raw Normal View History

2023-12-15 06:28:06 +00:00
#ifndef __USER_KEY_H
#define __USER_KEY_H
#include <stdint.h>
#include "key.h"
/******************************************************************************
*<EFBFBD>û<EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*******************************************************************************/
typedef struct
{
uint8_t menuIndex ; // <20><>ǰ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
uint8_t keyMenuToIndex ; // <20><><EFBFBD>¡<EFBFBD><C2A1>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>ʱת<CAB1><D7AA><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
uint8_t keyBackToIndex ; // <20><><EFBFBD>¡<EFBFBD><C2A1>˻ء<CBBB><D8A1><EFBFBD>ʱת<CAB1><D7AA><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
uint8_t keyUpToIndex ; // <20><><EFBFBD>¡<EFBFBD><C2A1><EFBFBD><EFBFBD>ϡ<EFBFBD><CFA1><EFBFBD>ʱת<CAB1><D7AA><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
uint8_t keyDnToIndex ; // <20><><EFBFBD>¡<EFBFBD><C2A1><EFBFBD><EFBFBD>¡<EFBFBD><C2A1><EFBFBD>ʱת<CAB1><D7AA><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
uint8_t keyLeftToIndex ; // <20><><EFBFBD>¡<EFBFBD><C2A1><EFBFBD><EFBFBD>󡱼<EFBFBD>ʱת<CAB1><D7AA><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
uint8_t keyRightToIndex ; // <20><><EFBFBD>¡<EFBFBD><C2A1><EFBFBD><EFBFBD>ҡ<EFBFBD><D2A1><EFBFBD>ʱת<CAB1><D7AA><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
uint8_t keyOkToIndex ; // <20><><EFBFBD>¡<EFBFBD>OK<4F><4B><EFBFBD><EFBFBD>ʱת<CAB1><D7AA><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void (*CurrentOperate)(void) ;// <20><>ǰ״̬Ӧ<CCAC><D3A6>ִ<EFBFBD>еĹ<D0B5><C4B9>ܲ<EFBFBD><DCB2><EFBFBD>
} KbdTab_s ; // <20>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/******************************************************************************
*<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*******************************************************************************/
# define MENU_MAX 55 <20><><EFBFBD><EFBFBD> // <20>˵<EFBFBD>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
extern volatile uint8_t currentMenuIndex ; //<2F><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>IJ˵<C4B2>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
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) ;
/*****************************************
*<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿں<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
****************************************/
extern void UserKeyInit(void) ;
extern void GetKeylnput(void ) ;
#endif