?? seed_rtciic.h
字號:
/*
* Copyright 2004 by SEED.
* All rights reserved. Property of SEED.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
*
*/
/* August 2005 */
/**************************************************************************/
/* seed_rtciic.h file */
/**************************************************************************/
#ifndef _SEED_RTCIIC_H
#define _SEED_RTCIIC_H
#include <std.h>
#include <csl_stdinc.h>
#include <csl_i2c.h>
#ifdef __cplusplus
extern "C" {
#endif
/* RTC definitions */
/*Alarm0*/
#define RTC_X1226_SCA0 0x0
#define RTC_X1226_MNA0 0x1
#define RTC_X1226_HRA0 0x2
#define RTC_X1226_DTA0 0x3
#define RTC_X1226_MOA0 0x4
#define RTC_X1226_YRA0 0x5
#define RTC_X1226_DWA0 0x6
#define RTC_X1226_Y2K0 0x7
/*Alarm1*/
#define RTC_X1226_SCA1 0x8
#define RTC_X1226_MNA1 0x9
#define RTC_X1226_HRA1 0xa
#define RTC_X1226_DTA1 0xb
#define RTC_X1226_MOA1 0xc
#define RTC_X1226_YRA1 0xd
#define RTC_X1226_DWA1 0xe
#define RTC_X1226_Y2K1 0xf
/*control*/
#define RTC_X1226_BL 0x10
#define RTC_X1226_INT 0x11
#define RTC_X1226_ATR 0x12
#define RTC_X1226_DTR 0x13
/*rtc*/
#define RTC_X1226_SC 0x30
#define RTC_X1226_MN 0x31
#define RTC_X1226_HR 0x32
#define RTC_X1226_DT 0x33
#define RTC_X1226_MO 0x34
#define RTC_X1226_YR 0x35
#define RTC_X1226_DW 0x36
#define RTC_X1226_Y2K 0x37
#define RTC_X1226_SR 0x3F
/*time mode*/
#define RTC_X1226_24 0x80
#define RTC_X1226_A/PM 0x00
typedef struct SEEDDM642_RTC_Config {
Uint32 year;
Uint32 month;
Uint32 day;
Uint32 hour;
Uint32 minutes;
Uint32 seconds;
Uint32 week;
} SEEDDM642_RTC_Config;
//write Enable
void RTC_write_enable(I2C_Handle hI2C);
//write the rtc register by IIC bus
void RTC_write(I2C_Handle hI2C, Uint32 subAddress, Uint8 *data);
//read the rtc register by IIC bus
void RTC_read( I2C_Handle hI2C,Uint32 subAddress,Uint8 *data);
#ifdef __cplusplus
}
#endif
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -