em_prs.h
Go to the documentation of this file.00001
00034 #ifndef __EM_PRS_H
00035 #define __EM_PRS_H
00036
00037 #include "em_device.h"
00038 #if defined(PRS_COUNT) && (PRS_COUNT > 0)
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00044
00049
00054
00055
00056
00057
00059 typedef enum
00060 {
00061 prsEdgeOff = PRS_CH_CTRL_EDSEL_OFF,
00062 prsEdgePos = PRS_CH_CTRL_EDSEL_POSEDGE,
00063 prsEdgeNeg = PRS_CH_CTRL_EDSEL_NEGEDGE,
00064 prsEdgeBoth = PRS_CH_CTRL_EDSEL_BOTHEDGES
00065 } PRS_Edge_TypeDef;
00066
00067
00068
00069
00070
00071
00087 __STATIC_INLINE void PRS_LevelSet(uint32_t level, uint32_t mask)
00088 {
00089 PRS->SWLEVEL = (PRS->SWLEVEL & ~mask) | (level & mask);
00090 }
00091
00092
00093
00107 __STATIC_INLINE void PRS_PulseTrigger(uint32_t channels)
00108 {
00109 PRS->SWPULSE = channels & _PRS_SWPULSE_MASK;
00110 }
00111
00112 void PRS_SourceSignalSet(unsigned int ch,
00113 uint32_t source,
00114 uint32_t signal,
00115 PRS_Edge_TypeDef edge);
00116
00117 #if defined( PRS_CH_CTRL_ASYNC )
00118 void PRS_SourceAsyncSignalSet(unsigned int ch,
00119 uint32_t source,
00120 uint32_t signal);
00121 #endif
00122
00126 #ifdef __cplusplus
00127 }
00128 #endif
00129
00130 #endif
00131 #endif