Update doxygen comments. Add TIM init for delayUs

This commit is contained in:
Henrik Stickann 2022-04-14 15:17:45 +02:00
parent 805b959161
commit ced5f9981f
7 changed files with 30 additions and 24 deletions

View File

@ -1,7 +1,7 @@
/**
* @brief Helper for easy system task setup in <sta/config.hpp>.
* @brief Helper for easy system task setup in `<sta/config.hpp>`.
*
* Define STA_OS2_SYSTEM_TASKS_ENABLE before including this header
* Define **STA_OS2_SYSTEM_TASKS_ENABLE** before including this header
* to enable all system tasks and required features.
*/
#ifndef STA_OS2_EASY_CONFIG_HPP

View File

@ -9,13 +9,13 @@
namespace sta
{
/**
* @brief Implementation of Mutex for CMSIS V2.
* @brief Implementation of `Mutex` interface using CMSIS RTOS2.
*/
class Os2Mutex : public Mutex
{
public:
/**
* @param handle CMSIS V2 mutex
* @param handle CMSIS RTOS2 mutex
*/
Os2Mutex(osMutexId_t * handle);
@ -23,7 +23,7 @@ namespace sta
void release() override;
private:
osMutexId_t * handle_; /**< CMSIS V2 mutex */
osMutexId_t * handle_; /**< CMSIS RTOS2 mutex */
};
} // namespace sta

View File

@ -8,9 +8,15 @@
namespace sta
{
/**
* @brief Implementation of `Signal` interface using CMSIS RTOS2.
*/
class Os2Signal : public Signal
{
public:
/**
* @param semaphore CMSIS RTOS2 semaphore
*/
Os2Signal(osSemaphoreId_t * semaphore);
void notify() override;
@ -19,7 +25,7 @@ namespace sta
void wait() override;
private:
osSemaphoreId_t * semaphore_;
osSemaphoreId_t * semaphore_; /**< CMSIS RTOS2 semaphore */
};
} // namespace sta

View File

@ -1,10 +1,9 @@
/**
* @brief Implementation of startup system task.
*
* Define STA_OS2_STARTUP_ENABLE in <sta/config.hpp> to enable.
*
* Configuration:
* STA_OS2_STARTUP_ENTRY_FUNCTION: Name of task entry function (default: startupTask)
* STA_OS2_STARTUP_ENABLE: Enable module
* STA_OS2_STARTUP_ENTRY_FUNCTION: Override name of startup task entry function (default: startupTask)
*/
#ifndef STA_OS2_STARTUP_HPP
#define STA_OS2_STARTUP_HPP

View File

@ -1,10 +1,9 @@
/**
* @brief Implementation of system events.
*
* Define STA_OS2_SYSTEM_EVENT_ENABLE in <sta/config.hpp> to enable.
*
* Set STA_OS2_SYSTEM_EVENT_HANDLE to name of global handle variable.
* Defaults to `systemEventHandle`.
* Configuration:
* STA_OS2_SYSTEM_EVENT_ENABLE: Enable module
* STA_OS2_SYSTEM_EVENT_HANDLE: Override variable name of flag handle (default: systemEventHandle)
*/
#ifndef STA_OS2_SYSTEM_EVENT_HPP
#define STA_OS2_SYSTEM_EVENT_HPP
@ -12,7 +11,7 @@
#include <sta/config.hpp>
#ifdef STA_OS2_SYSTEM_EVENT_ENABLE
#include <stdint.h>
#include <cstdint>
// System event flags

View File

@ -1,15 +1,13 @@
/**
* @brief Implementation of watchdog system task.
*
* Define STA_OS2_WATCHDOG_ENABLE in <sta/config.hpp> to enable.
*
* Configuration:
* STA_OS2_WATCHDOG_TIMER_PERIOD: Period of heartbeat timer (default: 1000)
* STA_OS2_WATCHDOG_TIMER_HANDLE: Name of global timer handle variable (default: heartbeatHandle)
* STA_OS2_WATCHDOG_TIMER_CALLBACK: Name of timer callback function (default: heartbeatCallback)
*
* STA_OS2_WATCHDOG_HANDLE: Name of global task handle variable (default: watchdogHandle)
* STA_OS2_WATCHDOG_ENTRY_FUNCTION: Name of task entry function (default: watchdogTask)
* STA_OS2_WATCHDOG_ENABLE: Enable module
* STA_OS2_WATCHDOG_TIMER_PERIOD: Set period in ticks of heartbeat timer (default: 1000)
* STA_OS2_WATCHDOG_TIMER_HANDLE: Override variable name of heartbeat timer handle (default: heartbeatHandle)
* STA_OS2_WATCHDOG_TIMER_CALLBACK: Override name of heartbeat timer callback function (default: heartbeatCallback)
* STA_OS2_WATCHDOG_HANDLE: Override variable name of watchdog task handle (default: watchdogHandle)
* STA_OS2_WATCHDOG_ENTRY_FUNCTION: Override name of watchdog task entry function (default: watchdogTask)
*/
#ifndef STA_OS2_WATCHDOG_HPP
#define STA_OS2_WATCHDOG_HPP
@ -17,7 +15,7 @@
#include <sta/config.hpp>
#ifdef STA_OS2_WATCHDOG_ENABLE
#include <stdint.h>
#include <cstdint>
// Watchdog task flags

View File

@ -36,7 +36,11 @@ extern "C"
#ifdef STA_OS2_WATCHDOG_ENABLE
// Start timers
sta::startWatchdogTimer();
#endif
#endif // STA_OS2_WATCHDOG_ENABLE
#ifdef STA_HAL_DELAY_US_TIM
HAL_TIM_Base_Start(&STA_HAL_DELAY_US_TIM);
#endif // STA_HAL_DELAY_US_TIM
// Wake tasks
sta::signalStartupEvent();