mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-423: Make it more obvious that MODULE_TASKCREATE_ALL and MODULE_INITIALIZE_ALL are macro (for now):
- remove the ; - also encapsulate the macro by {} in his own scope.
This commit is contained in:
parent
de55c56427
commit
6683ce8570
@ -77,7 +77,7 @@ int main()
|
||||
#endif
|
||||
|
||||
/* Initialize modules */
|
||||
MODULE_INITIALISE_ALL();
|
||||
MODULE_INITIALISE_ALL
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ static void systemTask(void *parameters)
|
||||
portTickType lastSysTime;
|
||||
|
||||
/* create all modules thread */
|
||||
MODULE_TASKCREATE_ALL();
|
||||
MODULE_TASKCREATE_ALL
|
||||
|
||||
// Initialize vars
|
||||
idleCounter = 0;
|
||||
|
@ -92,7 +92,7 @@ int main()
|
||||
PIOS_Board_Init();
|
||||
|
||||
/* Initialize modules */
|
||||
MODULE_INITIALISE_ALL();
|
||||
MODULE_INITIALISE_ALL
|
||||
|
||||
#if INCLUDE_TEST_TASKS
|
||||
/* Create test tasks */
|
||||
|
@ -41,9 +41,9 @@
|
||||
#define UAVOBJ_INITCALL(fn)
|
||||
#define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags)
|
||||
|
||||
#define MODULE_TASKCREATE_ALL();
|
||||
#define MODULE_TASKCREATE_ALL
|
||||
|
||||
#define MODULE_INITIALISE_ALL(); \
|
||||
#define MODULE_INITIALISE_ALL { \
|
||||
/* Initialize modules */ \
|
||||
InitModules(); \
|
||||
/* Start the FreeRTOS scheduler which never returns.*/ \
|
||||
@ -56,7 +56,7 @@
|
||||
PIOS_LED_Toggle(LED1); \
|
||||
PIOS_LED_Toggle(LED2); \
|
||||
PIOS_DELAY_WaitmS(100); \
|
||||
}
|
||||
}; }
|
||||
|
||||
#endif /* PIOS_INITCALL_H */
|
||||
|
||||
|
@ -41,9 +41,9 @@
|
||||
#define UAVOBJ_INITCALL(fn)
|
||||
#define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags)
|
||||
|
||||
#define MODULE_TASKCREATE_ALL();
|
||||
#define MODULE_TASKCREATE_ALL
|
||||
|
||||
#define MODULE_INITIALISE_ALL(); \
|
||||
#define MODULE_INITIALISE_ALL { \
|
||||
/* Initialize modules */ \
|
||||
InitModules(); \
|
||||
/* Start the FreeRTOS scheduler which never returns.*/ \
|
||||
@ -56,7 +56,7 @@
|
||||
PIOS_LED_Toggle(LED1); \
|
||||
PIOS_LED_Toggle(LED2); \
|
||||
PIOS_DELAY_WaitmS(100); \
|
||||
}
|
||||
}; }
|
||||
|
||||
|
||||
#endif /* PIOS_INITCALL_H */
|
||||
|
@ -76,7 +76,7 @@ extern initmodule_t __module_initcall_start[], __module_initcall_end[];
|
||||
#define UAVOBJ_INITCALL(fn) __define_initcall("uavobj",fn,1)
|
||||
#define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags) __define_module_initcall("module", ifn, iparam, sfn, sparam, flags)
|
||||
|
||||
#define MODULE_INITIALISE_ALL(); for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
#define MODULE_INITIALISE_ALL { for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
if (fn->fn_minit && ( (fn->flag & MODULE_EXEC_FIRST_FLAG) == MODULE_EXEC_FIRST_FLAG) ) \
|
||||
(fn->fn_minit)(); \
|
||||
for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
@ -84,11 +84,11 @@ extern initmodule_t __module_initcall_start[], __module_initcall_end[];
|
||||
(fn->fn_minit)(); \
|
||||
for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
if (fn->fn_minit && ( (fn->flag & MODULE_EXEC_LAST_FLAG) == MODULE_EXEC_LAST_FLAG) ) \
|
||||
(fn->fn_minit)();
|
||||
(fn->fn_minit)(); }
|
||||
|
||||
#define MODULE_TASKCREATE_ALL(); for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
#define MODULE_TASKCREATE_ALL { for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
if (fn->fn_tinit) \
|
||||
(fn->fn_tinit)();
|
||||
(fn->fn_tinit)(); }
|
||||
|
||||
#endif /* PIOS_INITCALL_H */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user