eLooM for STM32 application
v3.3.0
|
System global initialization. More...
#include "services/ApplicationContext.h"
#include "services/IApplicationErrorDelegate.h"
#include "services/IApplicationErrorDelegateVtbl.h"
#include "services/IAppPowerModeHelper.h"
#include "services/IAppPowerModeHelper_vtbl.h"
#include "services/IBoot.h"
#include "services/IBootVtbl.h"
Go to the source code of this file.
Data Structures | |
struct | _APIVersion |
Typedefs | |
typedef struct _APIVersion | APIVersion |
Functions | |
sys_error_code_t | SysInit (boolean_t bEnableBootIF) |
void | SysPreSleepProcessing (uint32_t *ulExpectedIdleTime) |
void | SysPostSleepProcessing (uint32_t *ulExpectedIdleTime) |
sys_error_code_t | SysLoadApplicationContext (ApplicationContext *pAppContext) |
sys_error_code_t | SysOnStartApplication (ApplicationContext *pAppContext) |
sys_error_code_t | SysTaskErrorHandler (AManagedTask *pxTask) |
boolean_t | SysEventsPending (void) |
IApplicationErrorDelegate * | SysGetErrorDelegate (void) |
IBoot * | SysGetBootIF (void) |
IAppPowerModeHelper * | SysGetPowerModeHelper (void) |
APIVersion | SysGetAPIVersion () |
System global initialization.
This file declare the SysInit() API function that initializes the minimum set of resources, hardware and software, in order to start the scheduler. It creates the INIT task, that is the first task running in the minimum initialized environment, and it is responsible for the application startup. INIT implements the sequence diagram displayed in Fig.2
For each managed task ...
Copyright (c) 2017 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
typedef struct _APIVersion APIVersion |
Create a type name for struct _APIVersion
boolean_t SysEventsPending | ( | void | ) |
Check if there are pending SysEvent.
TRUE
if there are SysEvent pending (that means to be served by the INIT task), FALSE
otherwise. APIVersion SysGetAPIVersion | ( | ) |
Get the API version of the framework.
IBoot * SysGetBootIF | ( | void | ) |
Get the Application defined Boot interface. A boot loader application should implement this interface. The default implementation is defined as weak so the application can provide its specific implementation. The default implementation does nothing.
IApplicationErrorDelegate * SysGetErrorDelegate | ( | void | ) |
Get the Application manager error delegate. This function is used by the system during the application startup in order to get an application specific object that implements the IApplicationErrorDelegate. The default implementation is defined as weak so the application can provide its specific implementation. The default implementation does nothing.
IAppPowerModeHelper * SysGetPowerModeHelper | ( | void | ) |
Get the Application Power Mode Helper. This function is used by the system during the application startup in order to get an application specific object that implements the IAppPowerModeHelper. The default implementation is defined as weak so the application can provide its specific implementation. For more information about the default implementation see TODO: STF ...
sys_error_code_t SysInit | ( | boolean_t | bEnableBootIF | ) |
It initialize the minimum set of resources, hardware and software, in order to start the scheduler, and create the INIT task. If bEnableBootIF == TRUE the system enable the Boot Interface. It is useful to develop a bootloader.
bEnableBootIF | specifies if the system has to enable the Boot Interface. |
sys_error_code_t SysLoadApplicationContext | ( | ApplicationContext * | pAppContext | ) |
This function is used by the system in order to add all the managed tasks to the application context. It is defined as weak in order to allow the user application to redefine it.
pAppContext | [IN] specifies a pointer to the application context to load with the application specific managed tasks. |
sys_error_code_t SysOnStartApplication | ( | ApplicationContext * | pAppContext | ) |
This function is called by the framework at the end of the initialization process and before the Init task releases the control to the application tasks. At this point all managed task has been created and the hardware is initialized. The application has a chance to execute some other initialization code before the scheduler runs the first application task.
pAppContext | [IN] specifies a pointer to the application context to load with the application specific managed tasks. |
void SysPostSleepProcessing | ( | uint32_t * | ulExpectedIdleTime | ) |
Post Sleep Processing. Called by the kernel when the MCU exits a sleep mode because configPOST_SLEEP_PROCESSING is defined to SysPostSleepProcessing().
ulExpectedIdleTime | Not used |
void SysPreSleepProcessing | ( | uint32_t * | ulExpectedIdleTime | ) |
Pre Sleep Processing. Called by the kernel before it places the MCU into a sleep mode because configPRE_SLEEP_PROCESSING() is defined to SysPreSleepProcessing().
ulExpectedIdleTime | [OUT] Expected time in idle state. It is set to 0 to indicate that SysPreSleepProcessing contains its own wait for interrupt or wait for event instruction and so the kernel vPortSuppressTicksAndSleep function does not need to execute the wfi instruction. |
sys_error_code_t SysTaskErrorHandler | ( | AManagedTask * | pxTask | ) |
Not used yet.
pxTask |