00001 #ifndef _DEV_RTC_H_ 00002 #define _DEV_RTC_H_ 00003 00004 #include <sys/device.h> 00005 00015 /* 00016 * Unique device number. 00017 */ 00018 #define RTC 12 00019 00020 /* 00021 * Pin number for CS of RTC chip. 00022 */ 00023 #define SPI_CS_RTC PORT4 00024 00025 00030 typedef struct _RTCDCB RTCDCB; 00031 00036 typedef struct _RTCICB RTCICB; 00037 00042 struct _RTCDCB { 00043 }; 00044 00049 struct _RTCICB { 00050 }; 00051 00055 extern NUTDEVICE devRtcSpi; 00056 00065 extern int RtcInit(NUTDEVICE *dev); 00066 00072 extern u_char rtcReadByte(u_char address); 00073 00081 extern void rtcWriteByte(u_char address, u_char data); 00082 00086 #endif