eLooM for STM32 application
v3.3.0
|
System global initialization. More...
#include "services/sysinit.h"
#include "services/syslowpower.h"
#include "services/sysdebug.h"
#include "services/NullErrorDelegate.h"
#include "services/SysDefPowerModeHelper.h"
#include "services/SysTimestamp.h"
#include "tx_api.h"
#include "tx_timer.h"
#include <string.h>
Data Structures | |
struct | _System |
Typedefs | |
typedef struct _System | System |
Variables | |
static System | s_xTheSystem |
System global initialization.
Copyright (c) 2016 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.
|
static |
Execute the power mode transaction for all managed tasks belonging to a given PMClass.
pxContext | [IN] specifies the Application Context. |
ePowerModeClass | [IN] specifies the a power mode class. |
eActivePowerMode | [IN] specifies the current power mode of the system. |
eNewPowerMode | [IN] specifies the new power mode that is to be activated by the system. |
|
static |
INIT task control loop. The INIT task is in charge of the system initialization.
thread_input | not used. |
INIT task control function. The INIT task is the first created and running task. It is responsible to complete the system initialization and to create all other system task.
pParams | not used |
void * SysAlloc | ( | size_t | nSize | ) |
Allocate a block of memory of a specific size.
nSize | [IN] specifies the size in byte of the requested memory. |
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. void SysFree | ( | void * | pvData | ) |
Release a block of memory.
pvData | [IN] specifies the start of teh block of memory to release. |
APIVersion SysGetAPIVersion | ( | ) |
Get the API version of the framework.
__weak 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.
__weak 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.
EPowerMode SysGetPowerMode | ( | void | ) |
Get the current system power mode.
__weak 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 ...
SysPowerStatus SysGetPowerStatus | ( | void | ) |
Get a copy of the system status related to the power management.
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. |
__weak 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. |
__weak 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 SysResetAEDCounter | ( | void | ) |
Reset the counter of the AED. Usually an AED use some kind of timeout to check that all managed tasks are working fine. A task should call this method before a critical operation, that is for example a write operation in FLASH or EEPROM, or a long critical section. For convenience the managed task interface has a function IMTResetAEDCounter() that can be used by a task instead of call directly the system function.
sys_error_code_t SysTaskErrorHandler | ( | AManagedTask * | pxTask | ) |
Not used yet.
pxTask |
void SystemClock_Config | ( | void | ) |
System Clock configuration procedure. It is provided by the CubeMX project.
__weak void SystemPower_Config | ( | void | ) |
Application defined function used to Used to configure the MCU for the low power mode. E.g. configure the unused PIN in analog to minimize the power consumption, and enable the ultra low power mode.
sys_error_code_t SysTsInit | ( | SysTimestamp_t * | _this, |
const void * | pxDrvCfg | ||
) |
Initialize the system timestamp service. This function, even if it is not static, is not declared in the header file because it should be used only by the INIT task.
_this | [IN] specifies a system timestamp object. |
pxDrvCfg | [IN] specify the configuration structure of an hardware timer or SYS_TS_USE_SW_TSDRIVER to use the RTOS tick. |
|
static |
The only instance of System object.