diff --git a/include/sta/rtos/mutex.hpp b/include/sta/rtos/mutex.hpp index 211a0b8..757292e 100644 --- a/include/sta/rtos/mutex.hpp +++ b/include/sta/rtos/mutex.hpp @@ -17,13 +17,13 @@ namespace sta * * @ingroup STA_RTOS_API */ - class RTOSMutex : public Mutex + class RtosMutex : public Mutex { public: /** * @param handle CMSIS RTOS2 mutex */ - RTOSMutex(osMutexId_t * handle); + RtosMutex(osMutexId_t * handle); void acquire() override; void release() override; diff --git a/include/sta/rtos/queue.hpp b/include/sta/rtos/queue.hpp index 933f998..e2b809a 100644 --- a/include/sta/rtos/queue.hpp +++ b/include/sta/rtos/queue.hpp @@ -20,7 +20,7 @@ namespace sta * @ingroup STA_RTOS_API */ template - class RTOSQueue + class RtosQueue { public: using Message = T; /**< Queue message type */ @@ -29,7 +29,7 @@ namespace sta /** * @param handle CMSIS RTOS2 queue handle */ - RTOSQueue(osMessageQueueId_t * handle); + RtosQueue(osMessageQueueId_t * handle); /** * @brief Place message in queue. diff --git a/include/sta/rtos/queue.tpp b/include/sta/rtos/queue.tpp index b5bfb10..35d14fe 100644 --- a/include/sta/rtos/queue.tpp +++ b/include/sta/rtos/queue.tpp @@ -11,27 +11,27 @@ namespace sta { template - RTOSQueue::RTOSQueue(osMessageQueueId_t * handle) + RtosQueue::RtosQueue(osMessageQueueId_t * handle) : handle_{handle} { STA_ASSERT(handle != nullptr); } template - bool RTOSQueue::put(const Message & msg, uint32_t timeout /* = osWaitForever */) + bool RtosQueue::put(const Message & msg, uint32_t timeout /* = osWaitForever */) { return (osOK == osMessageQueuePut(*handle_, &msg, 0, timeout)); } template - bool RTOSQueue::get(Message * outMsg, uint32_t timeout /* = osWaitForever */) + bool RtosQueue::get(Message * outMsg, uint32_t timeout /* = osWaitForever */) { uint8_t prio; return (osOK == osMessageQueueGet(*handle_, outMsg, &prio, timeout)); } template - uint32 RTOSQueue::available() const + uint32 RtosQueue::available() const { return osMessageQueueGetCount(*handle_); } diff --git a/include/sta/rtos/signal.hpp b/include/sta/rtos/signal.hpp index 059d87f..49fa599 100644 --- a/include/sta/rtos/signal.hpp +++ b/include/sta/rtos/signal.hpp @@ -17,13 +17,13 @@ namespace sta * * @ingroup STA_RTOS_API */ - class RTOSSignal : public Signal + class RtosSignal : public Signal { public: /** * @param semaphore CMSIS RTOS2 semaphore */ - RTOSSignal(osSemaphoreId_t * semaphore); + RtosSignal(osSemaphoreId_t * semaphore); void notify() override; bool peek() override; diff --git a/src/mutex.cpp b/src/mutex.cpp index c0a426c..faa5067 100644 --- a/src/mutex.cpp +++ b/src/mutex.cpp @@ -3,16 +3,16 @@ namespace sta { - RTOSMutex::RTOSMutex(osMutexId_t * handle) + RtosMutex::RtosMutex(osMutexId_t * handle) : handle_{handle} {} - void RTOSMutex::acquire() + void RtosMutex::acquire() { osMutexAcquire(*handle_, osWaitForever); } - void RTOSMutex::release() + void RtosMutex::release() { osMutexRelease(*handle_); } diff --git a/src/signal.cpp b/src/signal.cpp index 170ef57..7bd50fe 100644 --- a/src/signal.cpp +++ b/src/signal.cpp @@ -3,26 +3,26 @@ namespace sta { - RTOSSignal::RTOSSignal(osSemaphoreId_t * semaphore) + RtosSignal::RtosSignal(osSemaphoreId_t * semaphore) : semaphore_{semaphore} {} - void RTOSSignal::notify() + void RtosSignal::notify() { osSemaphoreRelease(*semaphore_); } - bool RTOSSignal::peek() + bool RtosSignal::peek() { return (osSemaphoreGetCount(*semaphore_) != 0); } - bool RTOSSignal::test() + bool RtosSignal::test() { return (osSemaphoreAcquire(*semaphore_, 0) == osOK); } - void RTOSSignal::wait() + void RtosSignal::wait() { osSemaphoreAcquire(*semaphore_, osWaitForever); }