GlobLib
HAL and API libraries for MCUs and hardware.
|
This module contains error code definitions for all libraries. More...
Files | |
file | stm32f103cb_debug.h |
Header file for stm32f103cb DEBUG. | |
Enumerations |
Functions | |
void | MCU_printError (mcu_error error) |
Print a given error number as a character stream. More... | |
void | MCU_debugEnable (void(*output_handle)(uint8_t)) |
Enables the debug feature. More... | |
void | MCU_debugDisable (void) |
Disables the debug feature. More... | |
uint8_t | MCU_debugIsEnabled (void) |
Checks if debug is enabled. More... | |
This module contains error code definitions for all libraries.
Each low level module has an error handling feature
enum mcu_error |
Error enumerators for the Debug peripheral.
These values are used to quantify errors which occur during configuration of each module When debugging is enabled through MCU_debugEnable(), these determine which string is passed to the error output stream
Definition at line 44 of file stm32f103cb_debug.h.
void MCU_debugDisable | ( | void | ) |
Disables the debug feature.
This will set any previous function pointer for the output stream to NULL.
Definition at line 88 of file stm32f103cb_debug.c.
void MCU_debugEnable | ( | void(*)(uint8_t) | output_handle | ) |
Enables the debug feature.
This sets the function pointer for the output stream utalized by MCU_printError().
This has to be called before any debug feature will work.
output_handle | Funtion pointer to the output stream. |
Definition at line 82 of file stm32f103cb_debug.c.
uint8_t MCU_debugIsEnabled | ( | void | ) |
Checks if debug is enabled.
This funtion is used internally in modules before calling MCU_printError().
Definition at line 94 of file stm32f103cb_debug.c.
void MCU_printError | ( | mcu_error | error | ) |
Print a given error number as a character stream.
This used the function pointer set with MCU_debugEnable to print the error definition as a stream of characters. The message matches the values set in mcu_error.
This is called automattically when an error has occured in the module. It can also be used manually from the return value of configuration functions (if available)
error | The error number to display. |
Definition at line 105 of file stm32f103cb_debug.c.