Sequencer
stm32_seq.h
Go to the documentation of this file.
1 
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef STM32_SEQ_H
23 #define STM32_SEQ_H
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 /* Includes ------------------------------------------------------------------*/
30 #include "stdint.h"
31 
36 /* Exported types ------------------------------------------------------------*/
45 typedef uint32_t UTIL_SEQ_bm_t;
46 
51 /* Exported constants --------------------------------------------------------*/
52 
70 #define UTIL_SEQ_DEFAULT (~0U)
71 
76 /* External variables --------------------------------------------------------*/
77 /* Exported macros -----------------------------------------------------------*/
78 /* Exported functions ------------------------------------------------------- */
79 
88 void UTIL_SEQ_Init( void );
89 
94 void UTIL_SEQ_DeInit( void );
95 
105 void UTIL_SEQ_Idle( void );
106 
114 void UTIL_SEQ_PreIdle( void );
115 
126 void UTIL_SEQ_PostIdle( void );
127 
136 void UTIL_SEQ_Run( UTIL_SEQ_bm_t Mask_bm );
137 
146 void UTIL_SEQ_RegTask( UTIL_SEQ_bm_t TaskId_bm, uint32_t Flags, void (*Task)( void ) );
147 
159 void UTIL_SEQ_SetTask( UTIL_SEQ_bm_t TaskId_bm , uint32_t Task_Prio );
160 
168 uint32_t UTIL_SEQ_IsSchedulableTask( UTIL_SEQ_bm_t TaskId_bm);
169 
179 void UTIL_SEQ_PauseTask( UTIL_SEQ_bm_t TaskId_bm );
180 
190 uint32_t UTIL_SEQ_IsPauseTask( UTIL_SEQ_bm_t TaskId_bm );
191 
200 void UTIL_SEQ_ResumeTask( UTIL_SEQ_bm_t TaskId_bm );
201 
210 void UTIL_SEQ_SetEvt( UTIL_SEQ_bm_t EvtId_bm );
211 
221 void UTIL_SEQ_ClrEvt( UTIL_SEQ_bm_t EvtId_bm );
222 
232 void UTIL_SEQ_WaitEvt( UTIL_SEQ_bm_t EvtId_bm );
233 
243 
255 void UTIL_SEQ_EvtIdle( UTIL_SEQ_bm_t TaskId_bm, UTIL_SEQ_bm_t EvtWaited_bm );
256 
265 #ifdef __cplusplus
266 }
267 #endif
268 
269 #endif /*__STM32_SEQ_H */
270 
271 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
UTIL_SEQ_SetTask
void UTIL_SEQ_SetTask(UTIL_SEQ_bm_t TaskId_bm, uint32_t Task_Prio)
This function requests a task to be executed.
Definition: stm32_seq.c:282
UTIL_SEQ_DeInit
void UTIL_SEQ_DeInit(void)
This function un-initializes the sequencer resources.
Definition: stm32_seq.c:170
UTIL_SEQ_IsSchedulableTask
uint32_t UTIL_SEQ_IsSchedulableTask(UTIL_SEQ_bm_t TaskId_bm)
This function checks if a task could be scheduled.
Definition: stm32_seq.c:294
UTIL_SEQ_IsEvtPend
UTIL_SEQ_bm_t UTIL_SEQ_IsEvtPend(void)
This function returns whether the waited event is pending or not It is useful only when the UTIL_SEQ_...
Definition: stm32_seq.c:399
UTIL_SEQ_Idle
__WEAK void UTIL_SEQ_Idle(void)
This function is called by the sequencer in critical section (PRIMASK bit) when.
Definition: stm32_seq.c:416
UTIL_SEQ_SetEvt
void UTIL_SEQ_SetEvt(UTIL_SEQ_bm_t EvtId_bm)
This function sets an event that is waited with UTIL_SEQ_WaitEvt()
Definition: stm32_seq.c:338
UTIL_SEQ_Run
void UTIL_SEQ_Run(UTIL_SEQ_bm_t Mask_bm)
This function requests the sequencer to execute all pending tasks using round robin mechanism....
Definition: stm32_seq.c:179
UTIL_SEQ_IsPauseTask
uint32_t UTIL_SEQ_IsPauseTask(UTIL_SEQ_bm_t TaskId_bm)
This function allows to know if the task has been put in pause. By default, all tasks are executed by...
Definition: stm32_seq.c:316
UTIL_SEQ_PreIdle
__WEAK void UTIL_SEQ_PreIdle(void)
This function is called by the sequencer outside critical section just before calling UTIL_SEQ_Idle( ...
Definition: stm32_seq.c:424
UTIL_SEQ_Init
void UTIL_SEQ_Init(void)
This function initializes the sequencer resources.
Definition: stm32_seq.c:157
UTIL_SEQ_WaitEvt
void UTIL_SEQ_WaitEvt(UTIL_SEQ_bm_t EvtId_bm)
This function waits for a specific event to be set. The sequencer loops UTIL_SEQ_EvtIdle() until the ...
Definition: stm32_seq.c:360
UTIL_SEQ_PostIdle
__WEAK void UTIL_SEQ_PostIdle(void)
This function is called by the sequencer outside critical section either.
Definition: stm32_seq.c:432
UTIL_SEQ_bm_t
uint32_t UTIL_SEQ_bm_t
bit mapping of the task. this value is used to represent a list of task (each corresponds to a task).
Definition: stm32_seq.h:45
UTIL_SEQ_PauseTask
void UTIL_SEQ_PauseTask(UTIL_SEQ_bm_t TaskId_bm)
This function prevents a task to be called by the sequencer even when set with UTIL_SEQ_SetTask() By ...
Definition: stm32_seq.c:305
UTIL_SEQ_ResumeTask
void UTIL_SEQ_ResumeTask(UTIL_SEQ_bm_t TaskId_bm)
This function allows again a task to be called by the sequencer if set with UTIL_SEQ_SetTask() This i...
Definition: stm32_seq.c:327
UTIL_SEQ_ClrEvt
void UTIL_SEQ_ClrEvt(UTIL_SEQ_bm_t EvtId_bm)
This function may be used to clear the event before calling UTIL_SEQ_WaitEvt() This API may be useful...
Definition: stm32_seq.c:349
UTIL_SEQ_RegTask
void UTIL_SEQ_RegTask(UTIL_SEQ_bm_t TaskId_bm, uint32_t Flags, void(*Task)(void))
This function registers a task in the sequencer.
Definition: stm32_seq.c:271
UTIL_SEQ_EvtIdle
__WEAK void UTIL_SEQ_EvtIdle(UTIL_SEQ_bm_t TaskId_bm, UTIL_SEQ_bm_t EvtWaited_bm)
This function loops until the waited event is set The application may either enter low power mode or ...
Definition: stm32_seq.c:404