rtos: fix coding style

pull/8711/head
Martin Kojtal 2018-11-12 10:33:38 +00:00
parent ef728d01dc
commit e1e20a64f9
4 changed files with 18 additions and 11 deletions

View File

@ -96,7 +96,8 @@ public:
*
* @note You may call this function from ISR context.
*/
T* alloc(uint32_t millisec=0) {
T *alloc(uint32_t millisec = 0)
{
return _pool.alloc();
}
@ -108,7 +109,8 @@ public:
*
* @note You may call this function from ISR context.
*/
T* calloc(uint32_t millisec=0) {
T *calloc(uint32_t millisec = 0)
{
return _pool.calloc();
}
@ -120,7 +122,8 @@ public:
*
* @note You may call this function from ISR context.
*/
osStatus put(T *mptr) {
osStatus put(T *mptr)
{
return _queue.put(mptr);
}
@ -136,7 +139,8 @@ public:
*
* @note You may call this function from ISR context if the millisec parameter is set to 0.
*/
osEvent get(uint32_t millisec=osWaitForever) {
osEvent get(uint32_t millisec = osWaitForever)
{
osEvent evt = _queue.get(millisec);
if (evt.status == osEventMessage) {
evt.status = osEventMail;
@ -152,7 +156,8 @@ public:
*
* @note You may call this function from ISR context.
*/
osStatus free(T *mptr) {
osStatus free(T *mptr)
{
return _pool.free(mptr);
}

View File

@ -143,7 +143,8 @@ public:
* parameter is set to 0.
*
*/
osStatus put(T* data, uint32_t millisec=0, uint8_t prio=0) {
osStatus put(T *data, uint32_t millisec = 0, uint8_t prio = 0)
{
return osMessageQueuePut(_id, &data, prio, millisec);
}
@ -182,7 +183,8 @@ public:
* @note You may call this function from ISR context if the millisec
* parameter is set to 0.
*/
osEvent get(uint32_t millisec=osWaitForever) {
osEvent get(uint32_t millisec = osWaitForever)
{
osEvent event;
T *data = NULL;
osStatus_t res = osMessageQueueGet(_id, &data, NULL, millisec);