📄 lib_st.h
字号:
//*----------------------------------------------------------------------------
//* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -