STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
|
DET driver configuration More...
#include "Det_Cfg.h"
Go to the source code of this file.
Data Structures | |
struct | _Det_ConfigType |
Det Config type More... | |
struct | Module |
Module Config type More... | |
Macros | |
#define | DET_ID_INIT 0x00u |
#define | DET_ID_REPORT_ERROR 0x01u |
#define | DET_ID_DE_START 0x02u |
#define | DET_ID_GET_VERSION_INFO 0x03u |
#define | DET_ID_REPORT_RUNTIME_ERROR 0x04u |
#define | DET_ID_REPORT_TRANSIENT_FAULT 0x05u |
#define | DET_E_PARAM_POINTER 0x01u |
#define | MAX_MODULE_ID 10u |
Typedefs | |
typedef struct _Det_ConfigType | Det_ConfigType |
Det Config type | |
Functions | |
void | Det_Init (const Det_ConfigType *ConfigPtr) |
Det Initialization | |
void | Det_Start (void) |
Det Start | |
Std_ReturnType | Det_ReportError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId) |
Det Report Error | |
Std_ReturnType | Det_ReportRuntimeError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId) |
Det Report Runtime Error | |
Std_ReturnType | Det_ReportTransientFault (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 FaultId) |
Det Report Transient Fault | |
void | Det_GetVersionInfo (Std_VersionInfoType *versioninfo) |
Det Get Version Info | |
DET driver configuration
The driver Default Error Tracer serve as a mechanisim for reporting and tracing development and runtime errors within the Basic Software.
#define MAX_MODULE_ID 10u |
Maximum index for the modules array
typedef struct _Det_ConfigType Det_ConfigType |
void Det_GetVersionInfo | ( | Std_VersionInfoType * | versioninfo | ) |
Det Get Version Info
Returns the version information of this module.
versioninfo | Pointer to where to store the version information of this module. |
< Det_GetVersionInfo() api service id
< Det_GetVersionInfo called with null parameter pointer
void Det_Init | ( | const Det_ConfigType * | ConfigPtr | ) |
Det Initialization
Service to initialize the Default Error Tracer.
ConfigPtr | Pointer to the selected configuration set. |
Std_ReturnType Det_ReportError | ( | uint16 | ModuleId, |
uint8 | InstanceId, | ||
uint8 | ApiId, | ||
uint8 | ErrorId ) |
Det Report Error
Service to report development errors.
ModuleId | ID of calling module. |
InstanceId | The identifier of the index based instance of a module, starting from 0, If the module is a single instance module it shall pass 0 as the InstanceId. |
ApiId | ID of API service in which error is detected (defined in SWS of calling module). |
ErrorId | ID of detected development error (defined in SWS of calling module). |
Std_ReturnType | never returns a value, but has a return type for compatibility with services and hooks. |
< Maximum index for the modules array
Std_ReturnType Det_ReportRuntimeError | ( | uint16 | ModuleId, |
uint8 | InstanceId, | ||
uint8 | ApiId, | ||
uint8 | ErrorId ) |
Det Report Runtime Error
Service to report runtime errors. If a callout has been configured then this callout shall be called.
ModuleId | ID of calling module. |
InstanceId | The identifier of the index based instance of a module, starting from 0, If the module is a single instance module it shall pass 0 as the InstanceId. |
ApiId | ID of API service in which error is detected (defined in SWS of calling module). |
ErrorId | ID of detected development error (defined in SWS of calling module). |
Std_ReturnType | returns always E_OK (is required for services) |
< Maximum index for the modules array
Std_ReturnType Det_ReportTransientFault | ( | uint16 | ModuleId, |
uint8 | InstanceId, | ||
uint8 | ApiId, | ||
uint8 | FaultId ) |
Det Report Transient Fault
Service to report transient faults. If a callout has been configured than this callout shall be called and the returned value of the callout shall be returned. Otherwise it returns immediately with E_OK.
ModuleId | ID of calling module. |
InstanceId | The identifier of the index based instance of a module, starting from 0, If the module is a single instance module it shall pass 0 as the InstanceId. |
ApiId | ID of API service in which error is detected (defined in SWS of calling module). |
FaultId | ID of detected transient fault (defined in SWS of calling module). |
If | no callout exists it shall return E_OK, otherwise it shall return the value of the configured callout. In case several callouts are configured the logical or (sum) of the callout return values shall be returned. Rationale: since E_OK=0, E_OK will be only returned if all are E_OK, and for multiple error codes there is a good chance to detect several of them. |
< Maximum index for the modules array
void Det_Start | ( | void | ) |