Files
stc32g128k/App/app_manager.h

59 lines
2.4 KiB
C
Raw Normal View History

#ifndef __APP_MANAGER_H__
#define __APP_MANAGER_H__
#include "config.h"
/* ====== 应用程序管理器 (AppManager) 核心接口 ====== */
/**
* @brief
* @details
* ClockApp (), MenuApp (), PairApp (),
* AlarmApp (), SOSApp () ClockApp
*/
void AppManager_Init(void);
/**
* @brief
* @param app_id ID ( APP_ID_MENU, APP_ID_PAIR)
* @details
* 1. OnStart
* 2. onClose()
* 3. is_active is_running 1
* 4. OnStart()
*/
void AppManager_StartApp(AppID app_id);
/**
* @brief
* @param evt
*/
void AppManager_DispatchEvent(SystemEvent evt);
/**
* @brief
* @details active_app onRun()
* CPU占用率限制机制 onRun
* CPU APP_ONRUN_MAX_TICKS (5ms)
* CPU
*/
void AppManager_RunActiveApp(void);
/**
* @brief ID
* @return AppID ID
*/
AppID AppManager_GetActiveAppID(void);
/* ====== 时间编辑状态机交互接口 ====== */
/**
* @brief
* @details MenuApp "HORLOGE"
* STATE_SET_TIME
*/
void Start_Time_Edit(void);
#endif // __APP_MANAGER_H__