lib_st.h

来自「ARM9200开发板的ROM boot程序源码1.0」· C头文件 代码 · 共 57 行

H
57
字号
//*----------------------------------------------------------------------------
//*         ATMEL Microcontroller Software Support  -  ROUSSET  -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name           : lib_st.h
//* Object              : System Timer Function Prototyping.
//*
//* 1.0 23/05/00  PF    : Creation
//*----------------------------------------------------------------------------

#ifndef lib_st_h
#define lib_st_h

#include    "periph/system_timer/st.h"
#include    "periph/aic/lib_aic.h"

// Following functions are declared inline to speed up
// the access to the System Timer ressources

__inline void AT91F_StSetWdMode(
		AT91PS_SYSTIMER pSt,
		unsigned int mode)
{
    pSt->ST_WDMR = mode ;
}

__inline void AT91F_StRearmWd(
		AT91PS_SYSTIMER pSt)
{
    pSt->ST_CR = ST_WDRST ;
}


__inline unsigned int AT91F_StGetState(
	AT91PS_SYSTIMER pSt)
{
	return (pSt->ST_SR);
}

//*-----------------------------------------------*/
//* System Timer Descriptor Structure Definition  */
//*----*------------------------------------------*/
typedef struct _AT91S_STDesc
{
    AT91S_SYSTIMER  *st_base ;          /* Peripheral base address */
    TypeAICHandler  *AsmSTHandler ;     /* Assembly interrupt handler */
    u_char          PeriphId ;          /* Peripheral Identifier */
} AT91S_STDesc, *AT91PS_STDesc;

extern void         AT91_STinit(AT91S_STDesc const *pSysTimer, unsigned int period);
extern unsigned int AT91_GetSTperiod(unsigned int period);
#endif /* lib_st_h */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?