Skip to content
Snippets Groups Projects
Verified Commit f9188451 authored by rahix's avatar rahix
Browse files

chore(epicardium): Fix style

parent 4c419805
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,8 @@
void *_api_call_start(api_id_t id, uintptr_t size)
{
while (SEMA_GetSema(_API_SEMAPHORE) == E_BUSY) {}
while (SEMA_GetSema(_API_SEMAPHORE) == E_BUSY) {
}
if (API_CALL_MEM->call_flag != _API_FLAG_IDLE) {
/*
......@@ -39,7 +40,8 @@ void*_api_call_transact(void*buffer)
/* Wait for the dispather to return */
__WFE();
while (SEMA_GetSema(_API_SEMAPHORE) == E_BUSY) {}
while (SEMA_GetSema(_API_SEMAPHORE) == E_BUSY) {
}
if (API_CALL_MEM->call_flag == _API_FLAG_RETURNED) {
break;
}
......
......@@ -14,9 +14,8 @@ int api_dispatcher_init()
* Enable TX events for both cores.
* TODO: Is this the right place?
*/
MXC_GCR->evten |= 0
| MXC_F_GCR_EVTEN_CPU0TXEVENT
| MXC_F_GCR_EVTEN_CPU1TXEVENT;
MXC_GCR->evten |=
MXC_F_GCR_EVTEN_CPU0TXEVENT | MXC_F_GCR_EVTEN_CPU1TXEVENT;
return ret;
}
......@@ -29,7 +28,8 @@ bool api_dispatcher_poll_once()
return false;
}
while (SEMA_GetSema(_API_SEMAPHORE) == E_BUSY) {}
while (SEMA_GetSema(_API_SEMAPHORE) == E_BUSY) {
}
if (API_CALL_MEM->call_flag != _API_FLAG_CALLING) {
SEMA_FreeSema(_API_SEMAPHORE);
......
......@@ -66,8 +66,7 @@ int main(void)
configMINIMAL_STACK_SIZE,
NULL,
tskIDLE_PRIORITY + 1,
NULL
) != pdPASS) {
NULL) != pdPASS) {
printf("Failed to create serial-comms task!\n");
abort();
}
......@@ -78,8 +77,7 @@ int main(void)
configMINIMAL_STACK_SIZE,
NULL,
tskIDLE_PRIORITY + 2,
&dispatcher_task_id
) != pdPASS) {
&dispatcher_task_id) != pdPASS) {
printf("Failed to create api dispatcher task!\n");
abort();
}
......
......@@ -74,10 +74,7 @@ void vSerialTask(void*pvParameters)
/* Setup read queue */
read_queue = xQueueCreateStatic(
SERIAL_READ_BUFFER_SIZE,
sizeof(char),
buffer,
&read_queue_data
SERIAL_READ_BUFFER_SIZE, sizeof(char), buffer, &read_queue_data
);
/* Setup UART interrupt */
......
......@@ -42,16 +42,20 @@ void post_idle_sleep(TickType_t xExpectedIdleTime)
xTaskNotifyGive(dispatcher_task_id);
}
// Do card10 house keeping. E.g. polling the i2c devices if they triggered an interrupt
// TODO: Do this in a more task fokused way (high/low ISR)
/*
* Do card10 house keeping. e.g. polling the i2c devices if they
* triggered an interrupt.
*
* TODO: Do this in a more task focused way (high/low ISR)
*/
card10_poll();
}
void vApplicationGetIdleTaskMemory(
StaticTask_t **ppxIdleTaskTCBBuffer,
StackType_t **ppxIdleTaskStackBuffer,
uint32_t *pulIdleTaskStackSize)
{
uint32_t *pulIdleTaskStackSize
) {
/*
* If the buffers to be provided to the Idle task are declared inside this
* function then they must be declared static - otherwise they will be allocated on
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment