Skip to content

Commit 5b2077e

Browse files
committed
fix(common): Adjust some formatting per indent-cont=120
As we updated astyle configuration to be in line with IDF style
1 parent b45fe14 commit 5b2077e

File tree

5 files changed

+124
-124
lines changed

5 files changed

+124
-124
lines changed

common_components/linux_compat/freertos/freertos_linux.c

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static struct generic_queue_handle *create_generic_queue(queue_type_t type, uint
6464
return h;
6565
}
6666

67-
QueueHandle_t xQueueCreate(uint32_t uxQueueLength, uint32_t uxItemSize )
67+
QueueHandle_t xQueueCreate(uint32_t uxQueueLength, uint32_t uxItemSize)
6868
{
6969
return (QueueHandle_t)create_generic_queue(QUEUE, uxQueueLength, uxItemSize);
7070
}
@@ -75,7 +75,7 @@ uint32_t xQueueSend(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t
7575
return osal_queue_send(h->q, (uint8_t *)pvItemToQueue, h->item_size) ? pdTRUE : pdFAIL;
7676
}
7777

78-
uint32_t xQueueSendToBack(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait )
78+
uint32_t xQueueSendToBack(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait)
7979
{
8080
return xQueueSend(xQueue, pvItemToQueue, xTicksToWait);
8181
}
@@ -86,7 +86,7 @@ uint32_t xQueueReceive(QueueHandle_t xQueue, void *pvBuffer, TickType_t xTicksTo
8686
return osal_queue_recv(h->q, (uint8_t *)pvBuffer, h->item_size, xTicksToWait) ? pdTRUE : pdFAIL;
8787
}
8888

89-
BaseType_t xSemaphoreGive( QueueHandle_t xQueue)
89+
BaseType_t xSemaphoreGive(QueueHandle_t xQueue)
9090
{
9191
struct generic_queue_handle *h = xQueue;
9292
if (h->type == MUTEX) {
@@ -96,7 +96,7 @@ BaseType_t xSemaphoreGive( QueueHandle_t xQueue)
9696
return xQueueSend(xQueue, &s_semaphore_data, portMAX_DELAY);
9797
}
9898

99-
BaseType_t xSemaphoreGiveRecursive( QueueHandle_t xQueue)
99+
BaseType_t xSemaphoreGiveRecursive(QueueHandle_t xQueue)
100100
{
101101
struct generic_queue_handle *h = xQueue;
102102
if (h->type == MUTEX_REC) {
@@ -106,7 +106,7 @@ BaseType_t xSemaphoreGiveRecursive( QueueHandle_t xQueue)
106106
return pdFALSE;
107107
}
108108

109-
BaseType_t xSemaphoreTake( QueueHandle_t xQueue, TickType_t pvTask )
109+
BaseType_t xSemaphoreTake(QueueHandle_t xQueue, TickType_t pvTask)
110110
{
111111
struct generic_queue_handle *h = xQueue;
112112
if (h->type == MUTEX) {
@@ -116,7 +116,7 @@ BaseType_t xSemaphoreTake( QueueHandle_t xQueue, TickType_t pvTask )
116116
return xQueueReceive(xQueue, &s_semaphore_data, portMAX_DELAY);
117117
}
118118

119-
BaseType_t xSemaphoreTakeRecursive( QueueHandle_t xQueue, TickType_t pvTask )
119+
BaseType_t xSemaphoreTakeRecursive(QueueHandle_t xQueue, TickType_t pvTask)
120120
{
121121
struct generic_queue_handle *h = xQueue;
122122
if (h->type == MUTEX_REC) {
@@ -126,7 +126,7 @@ BaseType_t xSemaphoreTakeRecursive( QueueHandle_t xQueue, TickType_t pvTask )
126126
return pdFALSE;
127127
}
128128

129-
void vQueueDelete( QueueHandle_t xQueue )
129+
void vQueueDelete(QueueHandle_t xQueue)
130130
{
131131
struct generic_queue_handle *h = xQueue;
132132
if (h->q) {
@@ -176,14 +176,14 @@ void vTaskSuspend(void *task)
176176
vTaskDelete(task);
177177
}
178178

179-
TickType_t xTaskGetTickCount( void )
179+
TickType_t xTaskGetTickCount(void)
180180
{
181181
struct timespec spec;
182182
clock_gettime(CLOCK_REALTIME, &spec);
183183
return spec.tv_nsec / 1000000 + spec.tv_sec * 1000;
184184
}
185185

186-
void vTaskDelay( const TickType_t xTicksToDelay )
186+
void vTaskDelay(const TickType_t xTicksToDelay)
187187
{
188188
usleep(xTicksToDelay * 1000);
189189
}
@@ -212,27 +212,27 @@ void *pthread_task(void *params)
212212
return NULL;
213213
}
214214

215-
TaskHandle_t xTaskCreateStaticPinnedToCore( TaskFunction_t pxTaskCode,
216-
const char *const pcName,
217-
const uint32_t ulStackDepth,
218-
void *const pvParameters,
219-
UBaseType_t uxPriority,
220-
StackType_t *const puxStackBuffer,
221-
StaticTask_t *const pxTaskBuffer,
222-
const BaseType_t xCoreID )
215+
TaskHandle_t xTaskCreateStaticPinnedToCore(TaskFunction_t pxTaskCode,
216+
const char *const pcName,
217+
const uint32_t ulStackDepth,
218+
void *const pvParameters,
219+
UBaseType_t uxPriority,
220+
StackType_t *const puxStackBuffer,
221+
StaticTask_t *const pxTaskBuffer,
222+
const BaseType_t xCoreID)
223223
{
224224
static TaskHandle_t pvCreatedTask;
225225
xTaskCreate(pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &pvCreatedTask);
226226
return pvCreatedTask;
227227
}
228228

229-
BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode,
230-
const char *const pcName,
231-
const uint32_t usStackDepth,
232-
void *const pvParameters,
233-
UBaseType_t uxPriority,
234-
TaskHandle_t *const pvCreatedTask,
235-
const BaseType_t xCoreID)
229+
BaseType_t xTaskCreatePinnedToCore(TaskFunction_t pvTaskCode,
230+
const char *const pcName,
231+
const uint32_t usStackDepth,
232+
void *const pvParameters,
233+
UBaseType_t uxPriority,
234+
TaskHandle_t *const pvCreatedTask,
235+
const BaseType_t xCoreID)
236236
{
237237
xTaskCreate(pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pvCreatedTask);
238238
return pdTRUE;
@@ -280,7 +280,7 @@ void xTaskNotifyGive(TaskHandle_t task)
280280
}
281281
}
282282

283-
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time )
283+
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time)
284284
{
285285
return true;
286286
}
@@ -290,32 +290,32 @@ TaskHandle_t xTaskGetCurrentTaskHandle(void)
290290
return (TaskHandle_t)pthread_self();
291291
}
292292

293-
EventGroupHandle_t xEventGroupCreate( void )
293+
EventGroupHandle_t xEventGroupCreate(void)
294294
{
295295
return osal_signal_create();
296296
}
297297

298-
void vEventGroupDelete( EventGroupHandle_t xEventGroup )
298+
void vEventGroupDelete(EventGroupHandle_t xEventGroup)
299299
{
300300
osal_signal_delete(xEventGroup);
301301
}
302302

303-
EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear )
303+
EventBits_t xEventGroupClearBits(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear)
304304
{
305305
return osal_signal_clear(xEventGroup, uxBitsToClear);
306306
}
307307

308-
EventBits_t xEventGroupGetBits( EventGroupHandle_t xEventGroup)
308+
EventBits_t xEventGroupGetBits(EventGroupHandle_t xEventGroup)
309309
{
310310
return osal_signal_get(xEventGroup);
311311
}
312312

313-
EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet )
313+
EventBits_t xEventGroupSetBits(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet)
314314
{
315315
return osal_signal_set(xEventGroup, uxBitsToSet);
316316
}
317317

318-
EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait )
318+
EventBits_t xEventGroupWaitBits(EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait)
319319
{
320320
return osal_signal_wait(xEventGroup, uxBitsToWaitFor, xWaitForAllBits, xTicksToWait);
321321
}

common_components/linux_compat/freertos/include/freertos/task.h

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,83 +19,83 @@ extern "C" {
1919
typedef void *StackType_t;
2020
typedef void *StaticTask_t;
2121

22-
void vTaskDelay( const TickType_t xTicksToDelay );
22+
void vTaskDelay(const TickType_t xTicksToDelay);
2323

2424
void xTaskNotifyGive(TaskHandle_t task);
2525

2626
void ulTaskNotifyTake(bool stuff, uint32_t timeout);
2727

2828
TaskHandle_t xTaskGetCurrentTaskHandle(void);
2929

30-
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time );
31-
32-
TaskHandle_t xTaskCreateStaticPinnedToCore( TaskFunction_t pxTaskCode,
33-
const char *const pcName,
34-
const uint32_t ulStackDepth,
35-
void *const pvParameters,
36-
UBaseType_t uxPriority,
37-
StackType_t *const puxStackBuffer,
38-
StaticTask_t *const pxTaskBuffer,
39-
const BaseType_t xCoreID );
40-
41-
BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode,
42-
const char *const pcName,
43-
const uint32_t usStackDepth,
44-
void *const pvParameters,
45-
UBaseType_t uxPriority,
46-
TaskHandle_t *const pvCreatedTask,
47-
const BaseType_t xCoreID);
30+
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time);
31+
32+
TaskHandle_t xTaskCreateStaticPinnedToCore(TaskFunction_t pxTaskCode,
33+
const char *const pcName,
34+
const uint32_t ulStackDepth,
35+
void *const pvParameters,
36+
UBaseType_t uxPriority,
37+
StackType_t *const puxStackBuffer,
38+
StaticTask_t *const pxTaskBuffer,
39+
const BaseType_t xCoreID);
40+
41+
BaseType_t xTaskCreatePinnedToCore(TaskFunction_t pvTaskCode,
42+
const char *const pcName,
43+
const uint32_t usStackDepth,
44+
void *const pvParameters,
45+
UBaseType_t uxPriority,
46+
TaskHandle_t *const pvCreatedTask,
47+
const BaseType_t xCoreID);
4848

4949
BaseType_t xTaskCreate(TaskFunction_t pvTaskCode, const char *const pcName, const uint32_t usStackDepth, void *const pvParameters, UBaseType_t uxPriority, TaskHandle_t *const pvCreatedTask);
5050

51-
TickType_t xTaskGetTickCount( void );
51+
TickType_t xTaskGetTickCount(void);
5252

53-
void vQueueDelete( QueueHandle_t xQueue );
53+
void vQueueDelete(QueueHandle_t xQueue);
5454

5555
QueueHandle_t xSemaphoreCreateBinary(void);
5656

5757
QueueHandle_t xSemaphoreCreateMutex(void);
5858
QueueHandle_t xSemaphoreCreateRecursiveMutex(void);
5959

60-
BaseType_t xSemaphoreGive( QueueHandle_t xQueue);
60+
BaseType_t xSemaphoreGive(QueueHandle_t xQueue);
6161

62-
BaseType_t xSemaphoreTake( QueueHandle_t xQueue, TickType_t pvTask );
62+
BaseType_t xSemaphoreTake(QueueHandle_t xQueue, TickType_t pvTask);
6363

64-
BaseType_t xSemaphoreGiveRecursive( QueueHandle_t xQueue);
64+
BaseType_t xSemaphoreGiveRecursive(QueueHandle_t xQueue);
6565

66-
BaseType_t xSemaphoreTakeRecursive( QueueHandle_t xQueue, TickType_t pvTask );
66+
BaseType_t xSemaphoreTakeRecursive(QueueHandle_t xQueue, TickType_t pvTask);
6767

6868
void vTaskDelete(TaskHandle_t *task);
6969

70-
QueueHandle_t xQueueCreate( uint32_t uxQueueLength,
71-
uint32_t uxItemSize );
70+
QueueHandle_t xQueueCreate(uint32_t uxQueueLength,
71+
uint32_t uxItemSize);
7272

7373
uint32_t xQueueSend(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait);
7474

7575
uint32_t xQueueReceive(QueueHandle_t xQueue, void *pvBuffer, TickType_t xTicksToWait);
7676

7777
void vTaskSuspend(void *task);
7878

79-
EventGroupHandle_t xEventGroupCreate( void );
80-
void vEventGroupDelete( EventGroupHandle_t xEventGroup );
81-
EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
82-
const EventBits_t uxBitsToClear );
79+
EventGroupHandle_t xEventGroupCreate(void);
80+
void vEventGroupDelete(EventGroupHandle_t xEventGroup);
81+
EventBits_t xEventGroupClearBits(EventGroupHandle_t xEventGroup,
82+
const EventBits_t uxBitsToClear);
8383

84-
EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
85-
const EventBits_t uxBitsToWaitFor,
86-
const BaseType_t xClearOnExit,
87-
const BaseType_t xWaitForAllBits,
88-
TickType_t xTicksToWait );
84+
EventBits_t xEventGroupWaitBits(EventGroupHandle_t xEventGroup,
85+
const EventBits_t uxBitsToWaitFor,
86+
const BaseType_t xClearOnExit,
87+
const BaseType_t xWaitForAllBits,
88+
TickType_t xTicksToWait);
8989

90-
EventBits_t xEventGroupGetBits( EventGroupHandle_t xEventGroup);
90+
EventBits_t xEventGroupGetBits(EventGroupHandle_t xEventGroup);
9191

92-
EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
93-
const EventBits_t uxBitsToSet );
92+
EventBits_t xEventGroupSetBits(EventGroupHandle_t xEventGroup,
93+
const EventBits_t uxBitsToSet);
9494

95-
uint32_t xQueueSendToBack(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait );
95+
uint32_t xQueueSendToBack(QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait);
9696

97-
void *heap_caps_malloc( size_t size, uint32_t caps);
98-
void heap_caps_free( void *ptr);
97+
void *heap_caps_malloc(size_t size, uint32_t caps);
98+
void heap_caps_free(void *ptr);
9999

100100
#ifdef __cplusplus
101101
}

0 commit comments

Comments
 (0)