00001 /***********************************************************************/ 00021 /* Peripheral group ----------------------------------------------------------- */ 00027 #ifndef LPC17XX_RIT_H_ 00028 #define LPC17XX_RIT_H_ 00029 00030 /* Includes ------------------------------------------------------------------- */ 00031 #include "LPC17xx.h" 00032 #include "lpc_types.h" 00033 00034 00035 #ifdef __cplusplus 00036 extern "C" 00037 { 00038 #endif 00039 00040 00041 /* Private Macros ------------------------------------------------------------- */ 00050 /*********************************************************************/ 00054 #define RIT_CTRL_INTEN ((uint32_t) (1)) 00055 00056 #define RIT_CTRL_ENCLR ((uint32_t) _BIT(1)) 00057 00058 #define RIT_CTRL_ENBR ((uint32_t) _BIT(2)) 00059 00060 #define RIT_CTRL_TEN ((uint32_t) _BIT(3)) 00061 00071 /* Public Types --------------------------------------------------------------- */ 00079 typedef struct 00080 { 00081 uint32_t CMPVAL; 00082 uint32_t MASKVAL; 00083 uint32_t COUNTVAL; 00084 }RIT_CMP_VAL; 00085 00086 /*************************** GLOBAL/PUBLIC MACROS ***************************/ 00088 #define PARAM_RITx(n) (((uint32_t *)n)==((uint32_t *)LPC_RIT)) 00089 00095 /* Public Functions ----------------------------------------------------------- */ 00100 void RIT_Init(LPC_RIT_TypeDef *RITx); 00101 void RIT_DeInit(LPC_RIT_TypeDef *RITx); 00102 void RIT_TimerConfig(LPC_RIT_TypeDef *RITx, RIT_CMP_VAL *value); 00103 void RIT_Cmd(LPC_RIT_TypeDef *RITx, FunctionalState NewState); 00104 void RIT_TimerClearCmd(LPC_RIT_TypeDef *RITx, FunctionalState NewState); 00105 void RIT_TimerEnableOnBreakCmd(LPC_RIT_TypeDef *RITx, FunctionalState NewState); 00106 IntStatus RIT_GetIntStatus(LPC_RIT_TypeDef *RITx); 00107 00112 #ifdef __cplusplus 00113 } 00114 #endif 00115 00116 #endif /* LPC17XX_RIT_H_ */ 00117 00122 /* --------------------------------- End Of File ------------------------------ */
Submit feedback about this site to: