📄 mfw_td.h
字号:
#ifndef _MFW_TD_H_
#define _MFW_TD_H_
/*
+--------------------------------------------------------------------+
| PROJECT: MMI-Framework (8417) $Workfile:: mfw_td.c $|
| $Author: root $Revision: 1.1.1.1 $|
| CREATED: 03.03.2003 $Modtime:: 10.04.00 14:58 $|
| STATE : code $|
+--------------------------------------------------------------------+
MODULE : MFW_TD
PURPOSE : This modul contains Time and Date functionality.
*/
#include <string.h>
#if defined (NEW_FRAME)
#include "typedefs.h"
#include "vsi.h"
#include "pei.h"
#include "custom.h"
#include "gsm.h"
#else
#include "stddefs.h"
#include "custom.h"
#include "gsm.h"
#include "vsi.h"
#endif
#include "mfw_mfw.h"
#include "mfw_utils.h"
#include "cus_aci.h"
#include "p_sim.h"
#include "pcm.h"
#include "rtc.h"
/***************************Data types****************************************
**/
#define T_MFW_TIME T_RTC_TIME
#define T_MFW_DATE T_RTC_DATE
typedef enum
{
MFW_TIME_FORMAT_12HOUR,
MFW_TIME_FORMAT_24HOUR
} T_MFW_TIME_FORMAT;
/*
* SIM Parameter
*/
#define T_MFW_TD_PARA UBYTE
/*
* Time and date Control Block
*/
typedef struct
{
T_MFW_EVENT emask; /* events of interest */
T_MFW_EVENT event; /* current event */
T_MFW_CB handler;
T_MFW_TD_PARA para;
} T_MFW_TD;
/*************************************Events**********************************************/
#define MFW_TD_ALARM 1
/***************************Prototypes****************************************
**/
void mfw_td_init(); // Initialise time and date on ME switch-on
T_MFW_HND mfw_td_create(MfwHnd hWin, MfwEvt event, MfwCb cbfunc);//specify MFW event handler
MfwRes mfw_td_delete (MfwHnd h);//delete event handler
MfwRes mfw_td_set_time(T_MFW_TIME* time);//set the current time
MfwRes mfw_td_set_date(T_MFW_DATE* date);//et the current date
char* mfw_td_get_clock_str(); // return clock string (ASCII).Used by MmiIdle
char* mfw_td_get_date_str(); // return date string(ASCII)
T_MFW_DATE* mfw_td_get_date();//return date structure .Used by MmiTimeDate
T_MFW_TIME* mfw_td_get_time();//return time structure
MfwRes mfw_td_set_alarm(T_MFW_TIME* time, T_MFW_DATE* date);//set alarm
MfwRes mfw_td_cancel_alarm();//cancel alarm
MfwRes mfw_td_get_alarm(T_MFW_TIME* time, T_MFW_DATE* date);// MmiTimeDate, editing
MfwRes mfw_td_set_time_format(T_MFW_TIME_FORMAT format);//set time format
void mfw_td_exit(); //kill any data structures
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -