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

📄 clk.h

📁 T-kernel 的extension源代码
💻 H
字号:
/* *---------------------------------------------------------------------- *    T-Kernel / Standard Extension * *    Copyright (C) 2006 by Ken Sakamura. All rights reserved. *    T-Kernel / Standard Extension is distributed  *      under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* *	clk.h * *	Clock driver */#ifndef __DEVICE_CLK_H__#define __DEVICE_CLK_H__#include <basic.h>#include <tk/devmgr.h>#ifdef __cplusplusextern "C" {#endif/* CLOCK/data number */typedef enum {	/* Common attribute */	DN_CKEVENT	= TDN_EVENT,	/* Individual attribute */	DN_CKDATETIME	= (-100),	DN_CKAUTOPWON	= (-101),	/* Model-dependent function */	DN_CKREGISTER	= (-200)} ClockDataNo;/* Access of nonvolatile register */typedef struct {	W	nreg;		/* Number of accessed registers */	struct ck_reg {		W	regno;	/* Intended register number */		UW	data;	/* Intended data */	} c[1];} CK_REGS;#define	CK_REGS_SZ(nreg)	( sizeof(W) + sizeof(struct ck_reg) * (nreg) )/* Calendar date & time definitions */#ifndef __date_tim__#define __date_tim__typedef struct {	W	d_year; 	/* Offset from 1900 (85 -)		*/	W	d_month;	/* Month (1 - 12, 0) 			*/	W	d_day;		/* Day (1 - 31)				*/	W	d_hour; 	/* Hour (0 - 23)			*/	W	d_min;		/* Minute (0 - 59)			*/	W	d_sec;		/* Second (0 - 59)			*/	W	d_week; 	/* Week (1 - 54)	(*)Not used	*/	W	d_wday; 	/* Day of week ( 0 - 6; 0 is Sunday)	*/	W	d_days; 	/* Day (1 - 366)	(*)Not used	*/} DATE_TIM;#endif /* __date_tim__ *//* Event notification */typedef T_DEVEVT_ID	ClockEvt;#ifdef __cplusplus}#endif#endif /* __DEVICE_CLK_H__ */

⌨️ 快捷键说明

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