📄 sp804.h
字号:
/*
* The content of this file or document is CONFIDENTIAL and PROPRIETARY
* to Jade Technologies Co., Ltd. It is subjected to the terms of a
* License Agreement between Licensee and Jade Technologies Co., Ltd.
* restricting among other things, the use, reproduction, distribution
* and transfer. Each of the embodiments, including this information
* and any derivative work shall retain this copyright notice.
*
* Copyright (c) 2004 - 2005 Jade Technologies Co., Ltd.
* All rights reserved.
*/
// ----------------------------------------------------------------
// File: sp804.h,v
// Revision: 1.0
// ----------------------------------------------------------------
// $
//
// sp804.h - Timer definition header file
#ifndef sp804_h
#define sp804_h
// Timer offsets within a timer bank
#define TIMER0_OFFSET (0x00)
#define TIMER1_OFFSET (0x20)
// Individual timer bases
#define PHYS_TIMER0_BASE (PHYS_CT_BASE + TIMER0_OFFSET)
#define PHYS_TIMER1_BASE (PHYS_CT_BASE + TIMER1_OFFSET)
#define PHYS_TIMER2_BASE (PHYS_CT2_BASE + TIMER0_OFFSET)
#define PHYS_TIMER3_BASE (PHYS_CT2_BASE + TIMER1_OFFSET)
/* Timer peripheral register definition */
typedef volatile struct TimerStruct
{
DWORD Load; /* TimerBase + 0x00 */
const DWORD Value; /* TimerBase + 0x04 */
DWORD Control; /* TimerBase + 0x08 */
DWORD InterruptClear; /* TimerBase + 0x0C */
const DWORD RawInterruptStatus; /* TimerBase + 0x10 */
const DWORD MaskedInterruptStatus; /* TimerBase + 0x14 */
DWORD BackgroundLoadValue; /* TimerBase + 0x18 */
} vstTimerRegs, *pvstTimerRegs;
/* Dual Timer peripheral register definition */
typedef struct DualTimerStruct
{
vstTimerRegs Timer0;
const DWORD Padding1;
vstTimerRegs Timer1;
const DWORD Padding[1001];
const DWORD TimerPeriphID0;
const DWORD TimerPeriphID1;
const DWORD TimerPeriphID2;
const DWORD TimerPeriphID3;
const DWORD TimerPCellID0;
const DWORD TimerPCellID1;
const DWORD TimerPCellID2;
const DWORD TimerPCellID3;
} stDualTimerRegs, *pstDualTimerRegs;
/* Timer Control bits */
const DWORD TimerControlEnable = 1<<7;
const DWORD TimerControlPeriodic = 1<<6;
const DWORD TimerControlFreeRun = 0<<6;
const DWORD TimerControlIntEnable = 1<<5;
const DWORD TimerControlSize16 = 0<<1;
const DWORD TimerControlSize32 = 1<<1;
const DWORD TimerControlWrapping = 0<<0;
const DWORD TimerControlOneShot = 1<<0;
#endif // sp804_h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -