triton_test_rtc.h
来自「OMAP1030 处理器的ARM 侧硬件测试代码 OMAP1030 是TI」· C头文件 代码 · 共 136 行
H
136 行
/*
* ============================================================================
*
* TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
*
* Property of Texas Instruments
* For Unrestricted Internal Use Only
* Unauthorized reproduction and/or distribution is strictly prohibited.
* This product is protected under copyright law and trade secret law as an
* unpublished work.
* Created 2003, (C) Copyright 2003 Texas Instruments. All rights reserved.
*
* Filename : triton_test_rtc.h
* Description : Lib used to test RTC module for Triton
* Project : Triton
* Author : Bruno Decroos
*
*
* =============================================================================
*/
#ifndef __TRITON_TEST_RTC_H
#define __TRITON_TEST_RTC_H
/* ============================================================================
* INCLUDE FILES (only if necessary)
* =============================================================================
*/
/* ============================================================================
* GLOBAL DEFINITIONS
* =============================================================================
*/
#define ROUND_LIMITS 3155673569 /* number of seconds 0/0/0 00h00m00s =>
31/12/99 23h59mn29s */
/* Error code for TC registers */
#define ERR_RTC_SEC 0x01 /* Acces seconds register */
#define ERR_RTC_MIN 0x02 /* Acces minutes register */
#define ERR_RTC_HRS 0x03 /* Acces hours register */
#define ERR_RTC_DAY 0x04 /* Acces days register */
#define ERR_RTC_MON 0x05 /* Acces months register */
#define ERR_RTC_YEAR 0x06 /* Acces year register */
#define ERR_RTC_WDAY 0x07 /* Acces week register */
/* Error code for ALARM registers */
#define ERR_RTC_ALARM_SEC 0x08
#define ERR_RTC_ALARM_MIN 0x09
#define ERR_RTC_ALARM_HRS 0x0A
#define ERR_RTC_ALARM_DAY 0x0B
#define ERR_RTC_ALARM_MON 0x0C
#define ERR_RTC_ALARM_YEAR 0x0D
/* Error code for General registers */
#define ERR_RTC_CTRL_REG 0x0E
#define ERR_RTC_INTERRUPTS_REG 0x0F
#define ERR_RTC_STATUS_REG 0x10
/* Error code for Compensation registers */
#define ERR_RTC_COMP_MSB_REG 0x11
#define ERR_RTC_COMP_LSB_REG 0x12
/* Error code for Rounding seconds */
#define ERR_RTC_ROUND_30S 0x13
/* Error code time modulo test */
#define ERR_RTC_SEC_INC 0x14
#define ERR_RTC_MIN_INC 0x15
#define ERR_RTC_HRS_INC 0x16
#define ERR_RTC_DAY_INC 0x17
#define ERR_RTC_MON_INC 0x18
#define ERR_RTC_YEAR_INC 0x19
#define ERR_RTC_WEEK_INC 0x1a
#define ERR_RTC_SEC_MOD 0x1b
#define ERR_RTC_MIN_MOD 0x1c
#define ERR_RTC_HRS_MOD 0x1d
#define ERR_RTC_DAY_MOD 0x1e
#define ERR_RTC_MON_MOD 0x1f
#define ERR_RTC_YEAR_MOD 0x20
#define ERR_RTC_WEEK_MOD 0x21
#define ERR_RTC_DATE_MOD 0x22
#define ERR_RTC_ALARM 0x23
/* Error code timer interrupt event */
#define ERR_RTC_1S_EVENT 0x24
#define ERR_RTC_1M_EVENT 0x25
#define ERR_RTC_1H_EVENT 0x26
#define ERR_RTC_1D_EVENT 0x27
#define ERR_RTC_1Y_EVENT 0x28
// Error code for R/W acces on register
#define ERR_RW_RTC_CTRL_REG 0x29
#define ERR_RW_RTC_RES_PROG_REG 0x2a
#define ERR_RW_RTC_POWER_ON_RESET_REG 0x2b
/* ============================================================================
* GLOBAL TYPES DEFINITIONS
* =============================================================================
*/
/* ============================================================================
* FUNCTIONS PROTOTYPES
* =============================================================================
*/
UWORD16 TEST_RTC_reset(void);
UWORD16 TEST_RTC_TC_register(struct rtc_tm *time);
UWORD16 TEST_RTC_Round_30s(struct rtc_tm *time, UWORD32*);
UWORD32 TEST_RTC_TC_alarm(UWORD32 *inth_count,struct rtc_tm *alarm_tm,struct rtc_tm *init_tm);
UWORD16 TEST_RTC_TC_It_timer(UWORD32 *inth_count);
UWORD16 TEST_RTC_TC_It_timer_second(UWORD32 *inth_count);
UWORD16 TEST_RTC_time_inc(UWORD32 *RTC_IrqCount);
UWORD16 TEST_RTC_time_modulo_sec_min(UWORD32 *RTC_IrqCount);
UWORD16 TEST_RTC_time_modulo_hour(UWORD32 *RTC_IrqCount);
UWORD16 TEST_RTC_time_modulo_day(UWORD32 *RTC_IrqCount);
UWORD16 TEST_RTC_time_modulo_wday(UWORD32 *RTC_IrqCount);
UWORD16 TEST_RTC_time_modulo(UWORD32 *RTC_IrqCount);
UWORD16 TEST_RTC_RW_Register(void);
#endif /* __LIB_NAME_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?