nanostakc cmsis rtos: fix coding style

pull/8711/head
Martin Kojtal 2018-11-12 10:43:45 +00:00
parent 3aab38140a
commit 29a1149bd6
13 changed files with 79 additions and 88 deletions

View File

@ -36,8 +36,7 @@ static const fhss_api_t *fhss_active_handle = NULL;
static EventQueue *equeue; static EventQueue *equeue;
#endif #endif
struct fhss_timeout_s struct fhss_timeout_s {
{
void (*fhss_timer_callback)(const fhss_api_t *fhss_api, uint16_t); void (*fhss_timer_callback)(const fhss_api_t *fhss_api, uint16_t);
uint32_t start_time; uint32_t start_time;
uint32_t stop_time; uint32_t stop_time;

View File

@ -229,8 +229,7 @@ static int nvm_fsm_update(cs_context_t *cs_context)
int ret_val = 0; int ret_val = 0;
tr_debug("nvm_fsm_update() state=%d", (int)cs_context->state); tr_debug("nvm_fsm_update() state=%d", (int)cs_context->state);
switch (cs_context->state) switch (cs_context->state) {
{
case NVM_STATE_UNINIT_DONE: case NVM_STATE_UNINIT_DONE:
cs_context->client_cb(cs_context->client_status, cs_context->client_context); cs_context->client_cb(cs_context->client_status, cs_context->client_context);
cs_context->state = NVM_STATE_NONE; cs_context->state = NVM_STATE_NONE;

View File

@ -22,8 +22,7 @@ uint8_t buf[100];
uint16_t buf_len; uint16_t buf_len;
uint16_t data_len; uint16_t data_len;
typedef struct typedef struct {
{
platform_nvm_status status; platform_nvm_status status;
void *ctx; void *ctx;
} test_platform_nvm_api_callback_t; } test_platform_nvm_api_callback_t;

View File

@ -101,8 +101,7 @@ static int32_t test_cfstore_write(ARM_CFSTORE_HANDLE hkey, const char* data, ARM
return cfstore_stub.write_ret_val; return cfstore_stub.write_ret_val;
} }
ARM_CFSTORE_DRIVER cfstore_driver = ARM_CFSTORE_DRIVER cfstore_driver = {
{
.Close = test_cfstore_close, .Close = test_cfstore_close,
.Create = test_cfstore_create, .Create = test_cfstore_create,
.Delete = test_cfstore_delete, .Delete = test_cfstore_delete,

View File

@ -17,26 +17,20 @@ void ns_dyn_mem_init(uint8_t *heap, uint16_t h_size, void (*passed_fptr)(heap_fa
void *ns_dyn_mem_alloc(int16_t alloc_size) void *ns_dyn_mem_alloc(int16_t alloc_size)
{ {
if (nsdynmemlib_stub.returnCounter > 0) if (nsdynmemlib_stub.returnCounter > 0) {
{
nsdynmemlib_stub.returnCounter--; nsdynmemlib_stub.returnCounter--;
return malloc(alloc_size); return malloc(alloc_size);
} } else {
else
{
return (nsdynmemlib_stub.expectedPointer); return (nsdynmemlib_stub.expectedPointer);
} }
} }
void *ns_dyn_mem_temporary_alloc(int16_t alloc_size) void *ns_dyn_mem_temporary_alloc(int16_t alloc_size)
{ {
if (nsdynmemlib_stub.returnCounter > 0) if (nsdynmemlib_stub.returnCounter > 0) {
{
nsdynmemlib_stub.returnCounter--; nsdynmemlib_stub.returnCounter--;
return malloc(alloc_size); return malloc(alloc_size);
} } else {
else
{
return (nsdynmemlib_stub.expectedPointer); return (nsdynmemlib_stub.expectedPointer);
} }
} }

View File

@ -19,7 +19,8 @@ void eventOS_timeout_cancel(timeout_t *t)
} }
void test_eventOS_timeout_trigger() { void test_eventOS_timeout_trigger()
{
test_callback(test_args); test_callback(test_args);
} }