EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
em_prs.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef EM_PRS_H
34 #define EM_PRS_H
35 
36 #include "em_device.h"
37 #if defined(PRS_COUNT) && (PRS_COUNT > 0)
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /***************************************************************************/
48 /***************************************************************************/
53 /*******************************************************************************
54  ******************************** ENUMS ************************************
55  ******************************************************************************/
56 
58 typedef enum
59 {
65 
66 /*******************************************************************************
67  ***************************** PROTOTYPES **********************************
68  ******************************************************************************/
69 
70 /***************************************************************************/
86 __STATIC_INLINE void PRS_LevelSet(uint32_t level, uint32_t mask)
87 {
88  PRS->SWLEVEL = (PRS->SWLEVEL & ~mask) | (level & mask);
89 }
90 
91 
92 /***************************************************************************/
106 __STATIC_INLINE void PRS_PulseTrigger(uint32_t channels)
107 {
108  PRS->SWPULSE = channels & _PRS_SWPULSE_MASK;
109 }
110 
111 void PRS_SourceSignalSet(unsigned int ch,
112  uint32_t source,
113  uint32_t signal,
114  PRS_Edge_TypeDef edge);
115 
116 #if defined( PRS_CH_CTRL_ASYNC )
117 void PRS_SourceAsyncSignalSet(unsigned int ch,
118  uint32_t source,
119  uint32_t signal);
120 #endif
121 
125 #ifdef __cplusplus
126 }
127 #endif
128 
129 #endif /* defined(PRS_COUNT) && (PRS_COUNT > 0) */
130 #endif /* EM_PRS_H */
#define PRS_CH_CTRL_EDSEL_BOTHEDGES
#define PRS_CH_CTRL_EDSEL_POSEDGE
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define _PRS_SWPULSE_MASK
Definition: efr32mg1p_prs.h:69
__STATIC_INLINE void PRS_LevelSet(uint32_t level, uint32_t mask)
Set level control bit for one or more channels.
Definition: em_prs.h:86
__STATIC_INLINE void PRS_PulseTrigger(uint32_t channels)
Trigger a high pulse (one HFPERCLK) for one or more channels.
Definition: em_prs.h:106
#define PRS_CH_CTRL_EDSEL_NEGEDGE
#define PRS_CH_CTRL_EDSEL_OFF
void PRS_SourceSignalSet(unsigned int ch, uint32_t source, uint32_t signal, PRS_Edge_TypeDef edge)
Set source and signal to be used for a channel.
Definition: em_prs.c:74
#define PRS
PRS_Edge_TypeDef
Definition: em_prs.h:58
void PRS_SourceAsyncSignalSet(unsigned int ch, uint32_t source, uint32_t signal)
Set source and asynchronous signal to be used for a channel.
Definition: em_prs.c:115