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

📄 timedate.h

📁 source code for a sample alarm control panel system using Freescale MC9S12DP256 . The project was im
💻 H
字号:
//=============================================================================
// File: TIMEDATE.H - V1.00
// Rem.: The ACPRD Project Page on the Web -> http://hc12web.de/acprd
//=============================================================================

#ifndef __TIMEDATE_H
#define __TIMEDATE_H

//-- Definitions --------------------------------------------------------------

//#define __USE_ASCTIME		// uncomment to add funcs asctime(), ctime()

//-- Includes -----------------------------------------------------------------

//-- Datatype Definitions -----------------------------------------------------

typedef UINT32 time_t;

struct tm {
	UINT8  tm_sec;		// 0..59
	UINT8  tm_min;		// 0..59
	UINT8  tm_hour;		// 0..23
	UINT8  tm_wday;		// 0(Sunday)..6
	UINT8  tm_mday;		// 1..31 (!!)
	UINT8  tm_mon;		// 0..11
	UINT16 tm_yday;		// 0..365
	UINT8  tm_year;		// year-1900
	INT8   tm_isdst;	// 0 ***
	};
// *** = not implemented, do not use

//-- Extern Declarations ------------------------------------------------------

extern volatile time_t systime;

//-- Macros -------------------------------------------------------------------

#define inctime()	systime++
#define gettimep()	((const time_t *)(&systime))

//-- Function Prototypes ------------------------------------------------------

time_t time(time_t *tptr);
UINT16 stime(time_t *tptr);
struct tm *gmtime(const time_t *tptr);
time_t mktime(struct tm *tmptr);

#ifdef __USE_ASCTIME
UINT8 *asctime(struct tm *tmptr);
UINT8 *ctime(time_t *tptr);
#endif //__USE_ASCTIME

#endif //__TIMEDATE_H =========================================================

⌨️ 快捷键说明

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