diff --git a/flight/libraries/inc/CoordinateConversions.h b/flight/libraries/inc/CoordinateConversions.h index e9369bd26..02369c45c 100644 --- a/flight/libraries/inc/CoordinateConversions.h +++ b/flight/libraries/inc/CoordinateConversions.h @@ -112,7 +112,7 @@ static inline void matrix_mult_3x3f(float a[3][3], float b[3][3], float result[3 result[2][2] = a[0][2] * b[2][0] + a[1][2] * b[2][1] + a[2][2] * b[2][2]; } -inline void matrix_inline_scale_3f(float a[3][3], float scale) +static inline void matrix_inline_scale_3f(float a[3][3], float scale) { a[0][0] *= scale; a[0][1] *= scale; @@ -127,7 +127,7 @@ inline void matrix_inline_scale_3f(float a[3][3], float scale) a[2][2] *= scale; } -inline void rot_about_axis_x(const float rotation, float R[3][3]) +static inline void rot_about_axis_x(const float rotation, float R[3][3]) { float s = sinf(rotation); float c = cosf(rotation); @@ -145,7 +145,7 @@ inline void rot_about_axis_x(const float rotation, float R[3][3]) R[2][2] = c; } -inline void rot_about_axis_y(const float rotation, float R[3][3]) +static inline void rot_about_axis_y(const float rotation, float R[3][3]) { float s = sinf(rotation); float c = cosf(rotation); @@ -163,7 +163,7 @@ inline void rot_about_axis_y(const float rotation, float R[3][3]) R[2][2] = c; } -inline void rot_about_axis_z(const float rotation, float R[3][3]) +static inline void rot_about_axis_z(const float rotation, float R[3][3]) { float s = sinf(rotation); float c = cosf(rotation); diff --git a/flight/libraries/inc/stopwatch.h b/flight/libraries/inc/stopwatch.h index b339c8767..eabf0c1bc 100644 --- a/flight/libraries/inc/stopwatch.h +++ b/flight/libraries/inc/stopwatch.h @@ -47,7 +47,7 @@ typedef struct { ///////////////////////////////////////////////////////////////////////////// -inline int32_t STOPWATCH_Init(uint32_t resolution, stopwatch_t *stopwatch) +static inline int32_t STOPWATCH_Init(uint32_t resolution, stopwatch_t *stopwatch) { stopwatch->raw = PIOS_DELAY_GetRaw(); stopwatch->resolution = resolution; @@ -58,7 +58,7 @@ inline int32_t STOPWATCH_Init(uint32_t resolution, stopwatch_t *stopwatch) // ! Resets the stopwatch // ! \return < 0 on errors ///////////////////////////////////////////////////////////////////////////// -inline int32_t STOPWATCH_Reset(stopwatch_t *stopwatch) +static inline int32_t STOPWATCH_Reset(stopwatch_t *stopwatch) { stopwatch->raw = PIOS_DELAY_GetRaw(); return 0; // no error @@ -68,7 +68,7 @@ inline int32_t STOPWATCH_Reset(stopwatch_t *stopwatch) // ! Returns current value of stopwatch // ! \return stopwatch value ///////////////////////////////////////////////////////////////////////////// -inline uint32_t STOPWATCH_ValueGet(stopwatch_t *stopwatch) +static inline uint32_t STOPWATCH_ValueGet(stopwatch_t *stopwatch) { uint32_t value = PIOS_DELAY_GetuSSince(stopwatch->raw); diff --git a/flight/pios/inc/pios_instrumentation.h b/flight/pios/inc/pios_instrumentation.h index 6eeaf683c..49e243998 100644 --- a/flight/pios/inc/pios_instrumentation.h +++ b/flight/pios/inc/pios_instrumentation.h @@ -47,7 +47,7 @@ extern int8_t pios_instrumentation_last_used_counter; * @param counter_handle handle of the counter to update @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter * @param newValue the updated value. */ -inline void PIOS_Instrumentation_updateCounter(pios_counter_t counter_handle, int32_t newValue) +static inline void PIOS_Instrumentation_updateCounter(pios_counter_t counter_handle, int32_t newValue) { PIOS_Assert(pios_instrumentation_perf_counters && counter_handle); vPortEnterCritical(); @@ -69,7 +69,7 @@ inline void PIOS_Instrumentation_updateCounter(pios_counter_t counter_handle, in * Used to determine the time duration of a code block, mark the begin of the block. @see PIOS_Instrumentation_TimeEnd * @param counter_handle handle of the counter @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter */ -inline void PIOS_Instrumentation_TimeStart(pios_counter_t counter_handle) +static inline void PIOS_Instrumentation_TimeStart(pios_counter_t counter_handle) { PIOS_Assert(pios_instrumentation_perf_counters && counter_handle); vPortEnterCritical(); @@ -83,7 +83,7 @@ inline void PIOS_Instrumentation_TimeStart(pios_counter_t counter_handle) * Used to determine the time duration of a code block, mark the end of the block. @see PIOS_Instrumentation_TimeStart * @param counter_handle handle of the counter @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter */ -inline void PIOS_Instrumentation_TimeEnd(pios_counter_t counter_handle) +static inline void PIOS_Instrumentation_TimeEnd(pios_counter_t counter_handle) { PIOS_Assert(pios_instrumentation_perf_counters && counter_handle); vPortEnterCritical(); @@ -106,7 +106,7 @@ inline void PIOS_Instrumentation_TimeEnd(pios_counter_t counter_handle) * Used to determine the mean period between each call to the function * @param counter_handle handle of the counter @see PIOS_Instrumentation_SearchCounter @see PIOS_Instrumentation_CreateCounter */ -inline void PIOS_Instrumentation_TrackPeriod(pios_counter_t counter_handle) +static inline void PIOS_Instrumentation_TrackPeriod(pios_counter_t counter_handle) { PIOS_Assert(pios_instrumentation_perf_counters && counter_handle); pios_perf_counter_t *counter = (pios_perf_counter_t *)counter_handle;