PRSEMLIB
Detailed Description
Peripheral Reflex System (PRS) Peripheral API.
This module contains functions to control the PRS peripheral of Silicon Labs 32-bit MCUs and SoCs. The PRS allows configurable, fast, and autonomous communication between peripherals on the MCU or SoC.
Enumerations |
|
enum |
PRS_Edge_TypeDef
{
prsEdgeOff = PRS_CH_CTRL_EDSEL_OFF, prsEdgePos = PRS_CH_CTRL_EDSEL_POSEDGE, prsEdgeNeg = PRS_CH_CTRL_EDSEL_NEGEDGE, prsEdgeBoth = PRS_CH_CTRL_EDSEL_BOTHEDGES } |
Functions |
|
__STATIC_INLINE void | PRS_LevelSet (uint32_t level, uint32_t mask) |
Set level control bit for one or more channels.
|
|
__STATIC_INLINE void | PRS_PulseTrigger (uint32_t channels) |
Trigger a high pulse (one HFPERCLK) for one or more channels.
|
|
void | PRS_SourceSignalSet (unsigned int ch, uint32_t source, uint32_t signal, PRS_Edge_TypeDef edge) |
Set a source and signal for a channel.
|
|
Enumeration Type Documentation
enum PRS_Edge_TypeDef |
Function Documentation
__STATIC_INLINE void PRS_LevelSet | ( | uint32_t |
level,
|
uint32_t |
mask
|
||
) |
Set level control bit for one or more channels.
The level value for a channel is XORed with both the pulse possibly issued by PRS_PulseTrigger() and the PRS input signal selected for the channel(s).
- Parameters
-
[in] level
Level to use for channels indicated by mask
. Use logical OR combination of PRS_SWLEVEL_CHnLEVEL defines for channels to set high level, otherwise 0.[in] mask
Mask indicating which channels to set level for. Use logical OR combination of PRS_SWLEVEL_CHnLEVEL defines.
Definition at line
85
of file
em_prs.h
.
References PRS .
__STATIC_INLINE void PRS_PulseTrigger | ( | uint32_t |
channels
|
) |
Trigger a high pulse (one HFPERCLK) for one or more channels.
Setting a bit for a channel causes the bit in the register to remain high for one HFPERCLK cycle. Pulse is XORed with both the corresponding bit in PRS SWLEVEL register and the PRS input signal selected for the channel(s).
- Parameters
-
[in] channels
Logical ORed combination of channels to trigger a pulse for. Use PRS_SWPULSE_CHnPULSE defines.
Definition at line
104
of file
em_prs.h
.
References _PRS_SWPULSE_MASK , and PRS .
void PRS_SourceSignalSet | ( | unsigned int |
ch,
|
uint32_t |
source,
|
||
uint32_t |
signal,
|
||
PRS_Edge_TypeDef |
edge
|
||
) |
Set a source and signal for a channel.
- Parameters
-
[in] ch
A channel to define the signal and source for. [in] source
A source to select for the channel. Use one of PRS_CH_CTRL_SOURCESEL_x defines. [in] signal
A signal (for selected source
) to use. Use one of PRS_CH_CTRL_SIGSEL_x defines.[in] edge
An edge (for selected source/signal) to generate the pulse for.
Definition at line
74
of file
em_prs.c
.
References _PRS_CH_CTRL_SIGSEL_MASK , _PRS_CH_CTRL_SOURCESEL_MASK , PRS , and PRS_CHAN_COUNT .