mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-12-10 14:48:03 +00:00
Improve README and doxygen comments
This commit is contained in:
79
README.md
79
README.md
@@ -1,8 +1,81 @@
|
||||
# Helpers
|
||||
# STA Core library
|
||||
|
||||
Collection of useful stuff.
|
||||
|
||||
|
||||
## lang.hpp
|
||||
|
||||
Macros related to compiler features. Not actually part of the language so renaming would be advised.
|
||||
# Modules
|
||||
|
||||
|
||||
## Assert
|
||||
|
||||
Assertion handling.
|
||||
|
||||
Configuration:
|
||||
* `#define STA_ASSERT_ENABLE`: Enable module
|
||||
* `#define STA_ASSERT_DISABLE`: Forces module off when defined
|
||||
* `#define STA_HALT <func_name>`: Override function called after failed asserts
|
||||
* `DEBUG`: Automatically enables module when defined
|
||||
* `NDEBUG`: Forces module off when defined
|
||||
|
||||
Both `sta::assert_failed` and `sta::assert_halt` provide weak definitions and
|
||||
can be overridden by the application. `sta::assert_halt` is only called
|
||||
via the **STA_HALT** macro which can also be provided by the application.
|
||||
|
||||
The default implementation of `sta::assert_failed` uses **STA_DEBUG_PRINT** internally
|
||||
and will not generate any output if the **DEBUG_SERIAL** module is disabled.
|
||||
|
||||
|
||||
## Debug Serial
|
||||
|
||||
Debug serial output macros.
|
||||
|
||||
Configuration:
|
||||
* `#define STA_DEBUG_SERIAL_ENABLE`: Enable module
|
||||
* `#define STA_DEBUG_SERIAL_DISABLE`: Forces module off when defined
|
||||
* `DEBUG`: Automatically enables module when defined
|
||||
* `NDEBUG`: Forces module off when defined
|
||||
|
||||
The `sta::DebugSerial` instance must be provided.
|
||||
|
||||
|
||||
## Endian
|
||||
|
||||
Endian-ness conversion for multi-byte types.
|
||||
|
||||
|
||||
## Enum Flags
|
||||
|
||||
Type for using enum values as combinable flags.
|
||||
|
||||
|
||||
## Lang
|
||||
|
||||
Macros related to compiler features. Not actually part of the C/C++ language.
|
||||
|
||||
|
||||
## MCU
|
||||
|
||||
Defines specific to different MCUs. Include the appropriate header from `sta/mcu`
|
||||
for the MCU used by the application in the `<sta/config.hpp>` header.
|
||||
|
||||
|
||||
## Printf
|
||||
|
||||
Choose which `printf` implementation is used by STA libraries.
|
||||
|
||||
Configuration:
|
||||
* `#define STA_PRINTF_USE_STDLIB`: Use the stdlib implementation
|
||||
* `#define STA_PRINTF_USE_MPALAND`: Use the implementation by Marco Paland (thread safe & reentrant)
|
||||
|
||||
|
||||
## HAL Delay
|
||||
|
||||
HAL based delay functions.
|
||||
|
||||
Configuration:
|
||||
* `#define STA_HAL_DELAY_ENABLE`: Enable module
|
||||
* `#define STA_HAL_DELAY_US_TIM <tim_handle>`: 1 MHz TIM instance used by `sta::delayUs`
|
||||
|
||||
TIM time base must be started before using `sta::delayUs` by calling `sta::initHAL`.
|
||||
When using the startup system task this is handled automatically.
|
||||
Reference in New Issue
Block a user