⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guiapp_action_autolocksavesubmenu.c

📁 IT projecotr reference design.
💻 C
字号:
/*****************************************************************************
**             TEXAS INSTRUMENTS PROPRIETARY INFORMATION
**
**  (c) Copyright, Texas Instruments Incorporated, 2006.
**      All Rights Reserved.
**
**  Property of Texas Instruments Incorporated. Restricted Rights -
**  Use, duplication, or disclosure is subject to restrictions set
**  forth in TI's program license agreement and associated documentation.
******************************************************************************/

#include "common.h"
#include "guiStyle.h"
#include "guiApp_action.h"
#include "adccontrol.h"



/* specify the highlight window as required by the GUI Style ADL */
int08 guiApp_action_AutolockSaveSubMenu_GetHighlightWindow( int16 menuId, uint08 *window )
{
    *window = WIND_AUTOLOCKSAVEHIGHLIGHT;
    return PASS;
}

/* implement item behavior, system interaction */
int08 guiApp_action_AutolockSaveSubMenu_GuiMsg( int16 menuId, int16 itemId, GUIMSG *msg )
{
    int08 index = -1;
    
    if( msg == NULL )
        return FAIL;

    switch( itemId )
    { 
        case ITEM_SAVESETTINGS1ITEM:
            if( msg->type == GUIMSG_ASSERT )
            {                    
                guiStyle_CloseMenu( menuId );
                index = 0;
            }
            break;
            
        case ITEM_SAVESETTINGS2ITEM:
            if( msg->type == GUIMSG_ASSERT )
            {                    
                guiStyle_CloseMenu( menuId );
                index = 1;
            }
            break;
            
        case ITEM_SAVESETTINGS3ITEM:
            if( msg->type == GUIMSG_ASSERT )
            {                    
                guiStyle_CloseMenu( menuId );
                index = 2;
            }
            break;
    
        case ITEM_SAVESETTINGSCANCEL:
            if( msg->type == GUIMSG_ASSERT )
            {                    
                guiStyle_CloseMenu( menuId );
            }
            break;
    
        default:
            return FAIL;
    }        
    
    if( -1 < index )
    {
        /* Call datapath function to update EEPROM if valid index */   
        adccontrol_SaveSettingsToSMT( index );
    }
    
    return PASS;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -