From de55c56427a6cd235c9ccfef3474c129280e4efb Mon Sep 17 00:00:00 2001 From: Mathieu Rondonneau Date: Fri, 24 Jun 2011 22:03:03 -0700 Subject: [PATCH] OP-423: Change capital on macro to be uppercase for consistency. --- flight/Modules/AHRSComms/ahrs_comms.c | 2 +- flight/Modules/Actuator/actuator.c | 2 +- flight/Modules/Altitude/altitude.c | 2 +- flight/Modules/Attitude/attitude.c | 2 +- flight/Modules/Battery/battery.c | 2 +- flight/Modules/Example/example.c | 2 +- flight/Modules/FirmwareIAP/firmwareiap.c | 2 +- flight/Modules/FlightPlan/flightplan.c | 2 +- flight/Modules/GPS/GPS.c | 2 +- flight/Modules/Guidance/guidance.c | 2 +- flight/Modules/ManualControl/manualcontrol.c | 2 +- flight/Modules/Stabilization/stabilization.c | 2 +- flight/Modules/System/systemmod.c | 2 +- flight/Modules/Telemetry/telemetry.c | 2 +- flight/PiOS.posix/inc/pios_initcall.h | 4 ++-- flight/PiOS.win32/inc/pios_initcall.h | 4 ++-- flight/PiOS/inc/pios_initcall.h | 4 ++-- flight/UAVObjects/uavobjecttemplate.c | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/flight/Modules/AHRSComms/ahrs_comms.c b/flight/Modules/AHRSComms/ahrs_comms.c index d080a9b4d..18fe81642 100644 --- a/flight/Modules/AHRSComms/ahrs_comms.c +++ b/flight/Modules/AHRSComms/ahrs_comms.c @@ -88,7 +88,7 @@ int32_t AHRSCommsInitialize(void) return 0; } -module_initcall(AHRSCommsInitialize, 0, AHRSCommsStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(AHRSCommsInitialize, 0, AHRSCommsStart, 0, MODULE_EXEC_NOORDER_FLAG); /** * Module thread, should not return. diff --git a/flight/Modules/Actuator/actuator.c b/flight/Modules/Actuator/actuator.c index a9bf40ebf..a203a1b74 100644 --- a/flight/Modules/Actuator/actuator.c +++ b/flight/Modules/Actuator/actuator.c @@ -116,7 +116,7 @@ int32_t ActuatorInitialize() return 0; } -module_initcall(ActuatorInitialize, 0, ActuatorStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(ActuatorInitialize, 0, ActuatorStart, 0, MODULE_EXEC_NOORDER_FLAG); /** * @brief Main Actuator module task diff --git a/flight/Modules/Altitude/altitude.c b/flight/Modules/Altitude/altitude.c index 6167d7d25..b81c3e3c3 100644 --- a/flight/Modules/Altitude/altitude.c +++ b/flight/Modules/Altitude/altitude.c @@ -90,7 +90,7 @@ int32_t AltitudeInitialize() return 0; } -module_initcall(AltitudeInitialize, 0, AltitudeStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(AltitudeInitialize, 0, AltitudeStart, 0, MODULE_EXEC_NOORDER_FLAG); /** * Module thread, should not return. */ diff --git a/flight/Modules/Attitude/attitude.c b/flight/Modules/Attitude/attitude.c index bc2983877..c0bd9e204 100644 --- a/flight/Modules/Attitude/attitude.c +++ b/flight/Modules/Attitude/attitude.c @@ -131,7 +131,7 @@ int32_t AttitudeInitialize(void) return 0; } -module_initcall(AttitudeInitialize, 0, AttitudeStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(AttitudeInitialize, 0, AttitudeStart, 0, MODULE_EXEC_NOORDER_FLAG); /** * Module thread, should not return. diff --git a/flight/Modules/Battery/battery.c b/flight/Modules/Battery/battery.c index 3da96080d..9d892c3a8 100644 --- a/flight/Modules/Battery/battery.c +++ b/flight/Modules/Battery/battery.c @@ -75,7 +75,7 @@ static void onTimer(UAVObjEvent* ev); * Initialise the module, called on startup * \returns 0 on success or -1 if initialisation failed */ -module_initcall(BatteryInitialize, 0); +MODULE_INITCALL(BatteryInitialize, 0, 0, 0, MODULE_EXEC_NOORDER_FLAG); int32_t BatteryInitialize(void) { static UAVObjEvent ev; diff --git a/flight/Modules/Example/example.c b/flight/Modules/Example/example.c index 5de6821a2..3df8e912c 100644 --- a/flight/Modules/Example/example.c +++ b/flight/Modules/Example/example.c @@ -59,4 +59,4 @@ void ExampleInitialize(void) { ExampleModEventInitialize(); } -module_initcall(ExampleInitialize, 0, ExampleStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(ExampleInitialize, 0, ExampleStart, 0, MODULE_EXEC_NOORDER_FLAG); diff --git a/flight/Modules/FirmwareIAP/firmwareiap.c b/flight/Modules/FirmwareIAP/firmwareiap.c index 696157630..bcd8a7f71 100644 --- a/flight/Modules/FirmwareIAP/firmwareiap.c +++ b/flight/Modules/FirmwareIAP/firmwareiap.c @@ -88,7 +88,7 @@ static void resetTask(UAVObjEvent *); * \note * */ -module_initcall(FirmwareIAPInitialize, 0, 0, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(FirmwareIAPInitialize, 0, 0, 0, MODULE_EXEC_NOORDER_FLAG); int32_t FirmwareIAPInitialize() { const struct pios_board_info * bdinfo = &pios_board_info_blob; diff --git a/flight/Modules/FlightPlan/flightplan.c b/flight/Modules/FlightPlan/flightplan.c index a9a0ac203..894399946 100644 --- a/flight/Modules/FlightPlan/flightplan.c +++ b/flight/Modules/FlightPlan/flightplan.c @@ -86,7 +86,7 @@ int32_t FlightPlanInitialize() return 0; } -module_initcall(FlightPlanInitialize, 0, FlightPlanStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(FlightPlanInitialize, 0, FlightPlanStart, 0, MODULE_EXEC_NOORDER_FLAG); /** * Module task */ diff --git a/flight/Modules/GPS/GPS.c b/flight/Modules/GPS/GPS.c index 04cf87d07..8fd4723aa 100644 --- a/flight/Modules/GPS/GPS.c +++ b/flight/Modules/GPS/GPS.c @@ -129,7 +129,7 @@ int32_t GPSInitialize(void) return 0; } -module_initcall(GPSInitialize, 0, GPSStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(GPSInitialize, 0, GPSStart, 0, MODULE_EXEC_NOORDER_FLAG); // **************** /** diff --git a/flight/Modules/Guidance/guidance.c b/flight/Modules/Guidance/guidance.c index d95a0c972..488d192c2 100644 --- a/flight/Modules/Guidance/guidance.c +++ b/flight/Modules/Guidance/guidance.c @@ -105,7 +105,7 @@ int32_t GuidanceInitialize() return 0; } -module_initcall(GuidanceInitialize, 0, GuidanceStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(GuidanceInitialize, 0, GuidanceStart, 0, MODULE_EXEC_NOORDER_FLAG); static float northVelIntegral = 0; static float eastVelIntegral = 0; diff --git a/flight/Modules/ManualControl/manualcontrol.c b/flight/Modules/ManualControl/manualcontrol.c index f71e3ed2f..b95b2a1e6 100644 --- a/flight/Modules/ManualControl/manualcontrol.c +++ b/flight/Modules/ManualControl/manualcontrol.c @@ -170,7 +170,7 @@ int32_t ManualControlInitialize() //ManualControlStart(); return 0; } -module_initcall(ManualControlInitialize, 0, ManualControlStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(ManualControlInitialize, 0, ManualControlStart, 0, MODULE_EXEC_NOORDER_FLAG); /** * Module task diff --git a/flight/Modules/Stabilization/stabilization.c b/flight/Modules/Stabilization/stabilization.c index 0043f61ab..dae2ac687 100644 --- a/flight/Modules/Stabilization/stabilization.c +++ b/flight/Modules/Stabilization/stabilization.c @@ -121,7 +121,7 @@ int32_t StabilizationInitialize() return 0; } -module_initcall(StabilizationInitialize, 0, StabilizationStart, 0, MODULE_EXEC_NOORDER_FLAG); +MODULE_INITCALL(StabilizationInitialize, 0, StabilizationStart, 0, MODULE_EXEC_NOORDER_FLAG); /** * Module task diff --git a/flight/Modules/System/systemmod.c b/flight/Modules/System/systemmod.c index fb9d9cc50..b9deb8590 100644 --- a/flight/Modules/System/systemmod.c +++ b/flight/Modules/System/systemmod.c @@ -111,7 +111,7 @@ int32_t SystemModInitialize(void) return 0; } -module_initcall(SystemModInitialize, 0, 0, 0, MODULE_EXEC_FIRST_FLAG); +MODULE_INITCALL(SystemModInitialize, 0, 0, 0, MODULE_EXEC_FIRST_FLAG); /** * System task, periodically executes every SYSTEM_UPDATE_PERIOD_MS */ diff --git a/flight/Modules/Telemetry/telemetry.c b/flight/Modules/Telemetry/telemetry.c index b5da66d90..9b738e4d8 100644 --- a/flight/Modules/Telemetry/telemetry.c +++ b/flight/Modules/Telemetry/telemetry.c @@ -143,7 +143,7 @@ int32_t TelemetryInitialize(void) return 0; } -module_initcall(TelemetryInitialize, 0, TelemetryStart, 0, MODULE_EXEC_LAST_FLAG); +MODULE_INITCALL(TelemetryInitialize, 0, TelemetryStart, 0, MODULE_EXEC_LAST_FLAG); /** * Register a new object, adds object to local list and connects the queue depending on the object's diff --git a/flight/PiOS.posix/inc/pios_initcall.h b/flight/PiOS.posix/inc/pios_initcall.h index 538d43daa..c83b6d77c 100644 --- a/flight/PiOS.posix/inc/pios_initcall.h +++ b/flight/PiOS.posix/inc/pios_initcall.h @@ -38,8 +38,8 @@ * and we cannot define a linker script for each of them atm */ -#define uavobj_initcall(fn) -#define module_initcall(ifn, iparam, sfn, sparam, flags) +#define UAVOBJ_INITCALL(fn) +#define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags) #define MODULE_TASKCREATE_ALL(); diff --git a/flight/PiOS.win32/inc/pios_initcall.h b/flight/PiOS.win32/inc/pios_initcall.h index 5c1c31c66..aebf64b29 100644 --- a/flight/PiOS.win32/inc/pios_initcall.h +++ b/flight/PiOS.win32/inc/pios_initcall.h @@ -38,8 +38,8 @@ * and we cannot define a linker script for each of them atm */ -#define uavobj_initcall(fn) -#define module_initcall(ifn, iparam, sfn, sparam, flags) +#define UAVOBJ_INITCALL(fn) +#define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags) #define MODULE_TASKCREATE_ALL(); diff --git a/flight/PiOS/inc/pios_initcall.h b/flight/PiOS/inc/pios_initcall.h index b7cf00535..3c71d892d 100644 --- a/flight/PiOS/inc/pios_initcall.h +++ b/flight/PiOS/inc/pios_initcall.h @@ -73,8 +73,8 @@ extern initmodule_t __module_initcall_start[], __module_initcall_end[]; static initmodule_t __initcall_##fn __attribute__((__used__)) \ __attribute__((__section__(".initcall" level ".init"))) = { .flag = param, .param_minit = iparam, .fn_minit = ifn, .param_tinit = sparam, .fn_tinit = sfn } -#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 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++) \ if (fn->fn_minit && ( (fn->flag & MODULE_EXEC_FIRST_FLAG) == MODULE_EXEC_FIRST_FLAG) ) \ diff --git a/flight/UAVObjects/uavobjecttemplate.c b/flight/UAVObjects/uavobjecttemplate.c index 3fd1517eb..9dd45b09f 100644 --- a/flight/UAVObjects/uavobjecttemplate.c +++ b/flight/UAVObjects/uavobjecttemplate.c @@ -64,7 +64,7 @@ int32_t $(NAME)Initialize(void) } } -uavobj_initcall($(NAME)Initialize); +UAVOBJ_INITCALL($(NAME)Initialize); /** * Initialize object fields and metadata with the default values.