#ifndef __ZX234290_RTC_H | |
#define __ZX234290_RTC_H | |
//typedef unsigned char UINT8; | |
//typedef int UINT16; | |
//#define ZX234290_RTC_IRQ 81 // 49+32 | |
#define ZX234290_RTC_ONE_HOUR_INT_MASK_LSH (4) | |
#define ZX234290_RTC_ONE_HOUR_INT_MASK_WID (1) | |
#define ZX234290_RTC_ONE_MINUTE_INT_MASK_LSH (3) | |
#define ZX234290_RTC_ONE_MINUTE_INT_MASK_WID (1) | |
#define ZX234290_RTC_ALARM_INT_MASK_LSH (0) | |
#define ZX234290_RTC_ALARM_INT_MASK_WID (1) | |
#define ZX234290_RTC_ALARM_INT_EN_LSH (1) | |
#define ZX234290_RTC_ALARM_INT_EN_WID (1) | |
#define ZX234290_RTC_TIMER_INT_EN_LSH (0) | |
#define ZX234290_RTC_TIMER_INT_EN_WID (1) | |
/*RTC TIME SECONDS MIN HOU DAY MON YEAR WEEKDAY*/ | |
#define ZX234290_RTC_TIME_SECONDS_LSH (0) | |
#define ZX234290_RTC_TIME_SECONDS_WID (7) | |
#define ZX234290_RTC_TIME_MINUTES_LSH (0) | |
#define ZX234290_RTC_TIME_MINUTES_WID (7) | |
#define ZX234290_RTC_TIME_HOURS_LSH (0) | |
#define ZX234290_RTC_TIME_HOURS_WID (6) | |
#define ZX234290_RTC_TIME_DAYS_LSH (0) | |
#define ZX234290_RTC_TIME_DAYS_WID (6) | |
#define ZX234290_RTC_TIME_MONTHS_LSH (0) | |
#define ZX234290_RTC_TIME_MONTHS_WID (5) | |
#define ZX234290_RTC_TIME_CENTURY_LSH (7) | |
#define ZX234290_RTC_TIME_CENTURY_WID (1) | |
#define ZX234290_RTC_TIME_YEAR_LSH (0) | |
#define ZX234290_RTC_TIME_YEAR_WID (8) | |
#define ZX234290_RTC_TIME_WEEKDAY_LSH (0) | |
#define ZX234290_RTC_TIME_WEEKDAY_WID (3) | |
/*RTC ALARM MIN HOU DAY WEEKDAY*/ | |
#define ZX234290_RTC_AlARM_MINUTES_LSH (0) | |
#define ZX234290_RTC_AlARM_MINUTES_WID (7) | |
#define ZX234290_RTC_AlARM_HOURS_LSH (0) | |
#define ZX234290_RTC_AlARM_HOURS_WID (6) | |
#define ZX234290_RTC_AlARM_DAYS_LSH (0) | |
#define ZX234290_RTC_AlARM_DAYS_WID (6) | |
#define ZX234290_RTC_AlARM_WEEKDAY_LSH (0) | |
#define ZX234290_RTC_AlARM_WEEKDAY_WID (3) | |
#define ZX234290_RTC_AlARM_SECOND_LSH (0) | |
#define ZX234290_RTC_AlARM_SECOND_WID (7) | |
/*RTC ALARM1 IGNORE*/ | |
#define ZX234290_RTC_AlARM1_SECONDSIGNORE_LSH (7) | |
#define ZX234290_RTC_AlARM1_SECONDSIGNORE_WID (1) | |
#define ZX234290_RTC_AlARM1_MINUTESIGNORE_LSH (7) | |
#define ZX234290_RTC_AlARM1_MINUTESIGNORE_WID (1) | |
#define ZX234290_RTC_AlARM1_HOURSIGNORE_LSH (7) | |
#define ZX234290_RTC_AlARM1_HOURSIGNORE_WID (1) | |
#define ZX234290_RTC_AlARM1_DAYSIGNORE_LSH (7) | |
#define ZX234290_RTC_AlARM1_DAYSIGNORE_WID (1) | |
#define ZX234290_RTC_AlARM1_MONTHSIGNORE_LSH (7) | |
#define ZX234290_RTC_AlARM1_MONTHSIGNORE_WID (1) | |
#define ZX234290_RTC_AlARM1_YEARIGNORE_LSH (7) | |
#define ZX234290_RTC_AlARM1_YEARIGNORE_WID (1) | |
#define ZX234290_RTC_AlARM1_WEEKDAYIGNORE_LSH (7) | |
#define ZX234290_RTC_AlARM1_WEEKDAYIGNORE_WID (1) | |
#define ZX234290_RTC_ALARM_AF_LSH (3) | |
#define ZX234290_RTC_ALARM_AF_WID (1) | |
/*RTC ALARM Enable*/ | |
#define ZX234290_RTC_AlARM_ACTIVATED_LSH (7) | |
#define ZX234290_RTC_AlARM_ACTIVATED_WID (1) | |
/* RTC TIMER ENABLE */ | |
#define ZX234290_RTC_TIMER_EN_LSH (7) | |
#define ZX234290_RTC_TIMER_EN_WID (1) | |
#define ZX234290_RTC_TIMER_TD_LSH (0) | |
#define ZX234290_RTC_TIMER_TD_WID (2) | |
#define ZX234290_RTC_TIMER_CNT_LSH (0) | |
#define ZX234290_RTC_TIMER_CNT_WID (8) | |
/*RTC UNLOCK*/ | |
#define ZX234290_RTC_UNLOCK_LSH (2) | |
#define ZX234290_RTC_UNLOCK_WID (1) | |
#define ZX234290_RTC_DATALATCH_LSH (3) | |
#define ZX234290_RTC_DATALATCH_WID (1) | |
#define ZX234290_MONITOR_FLA_LSH (0) | |
#define ZX234290_MONITOR_FLA_WID (1) | |
/*reg 0x31*/ | |
#define ZX234290_RTC_TIE_LSH (0) | |
#define ZX234290_RTC_TIE_WID (1) | |
#define ZX234290_RTC_AIE_LSH (1) | |
#define ZX234290_RTC_AIE_WID (1) | |
#define ZX234290_RTC_TF_LSH (2) | |
#define ZX234290_RTC_TF_WID (1) | |
#define ZX234290_RTC_AF_LSH (3) | |
#define ZX234290_RTC_AF_WID (1) | |
#endif |