Menu_Interface.c 2.28 KB
Newer Older
hu's avatar
hu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59

#include "Menu.h"
/*-------------------------------------------------------*/

/*-----------------------------------------------------------------*/

/*-------------------Logic_Operation Call Back---------------------*/

/*---------------------------------------------------------------------------------------*/

//const Menu_Item_Attribute_st_t stMenuItemAttribute[MENU_ITEM_MAX] =
//	{
//		/*MENU_ITEM_ENTRANCE_FIX     */ {0, 0, 0, 0U, 2U, 2U, 0U, 0, 0, 0XFFU, 0, 0, 0, 0, 0, 0, 0U},
//};

/*-------------------------------------------------------------------------------------------------*/

/*--------------------------The following usage is recommended, but not required--------------------------------*/
/*--------------------------The following usage is recommended, but not required--------------------------------*/
/*--------------------------The following usage is recommended, but not required--------------------------------*/

static void Menu_Cursor_Preprocess(Menu_Key_en_t enMenuKey);
static void Menu_Cursor_Postprocess(Menu_Key_en_t enMenuKey);
void Menu_Service(Menu_Key_en_t enMenuKey);

/*传入按键动作执行之前需要预先处理的动作*/
static void Menu_Cursor_Preprocess(Menu_Key_en_t enMenuKey)
{

	/*预处理中执行过本次按键了,后续不必执行时调用一次*/
	/*u8MenuKeyExecute = 0U;*/
}
/*传入按键动作执行之后需要后置处理的动作*/
static void Menu_Cursor_Postprocess(Menu_Key_en_t enMenuKey)
{
}

/*------------传入按键类型-----------------------*/
void Menu_Service(Menu_Key_en_t enMenuKey)
{
	/*功能回调函数的调用*/
	Menu_Logic_Process(enMenuKey);
	/*--------------------------------------------------*/
	/*按键动作对光标的处理*/
	Menu_Cursor_Preprocess(enMenuKey);
	Menu_Cursor_Process(enMenuKey);
	Menu_Cursor_Postprocess(enMenuKey);
	/*--------------------------------------------------*/
}

/*-------------------------------------*/
/*-------------------------------------*/
/*-------------------------------------*/
#pragma ghs section bss = ".myNonInitArea"
uint8_t u8MenuRamData[MENU_RAM_DATA_LEN];
#pragma ghs section bss = default
/*---------------------------------------*/
/*---------------------------------------*/
/*---------------------------------------*/