diff --git a/armsrc/desfire_crypto.c b/armsrc/desfire_crypto.c index db543bbe6..cafa98de1 100644 --- a/armsrc/desfire_crypto.c +++ b/armsrc/desfire_crypto.c @@ -46,9 +46,9 @@ static mbedtls_des_context ctx; static mbedtls_des3_context ctx3; static mbedtls_aes_context actx; -static inline void update_key_schedules(desfirekey_t key); +static void update_key_schedules(desfirekey_t key); -static inline void update_key_schedules(desfirekey_t key) { +static void update_key_schedules(desfirekey_t key) { // DES_set_key ((DES_cblock *)key->data, &(key->ks1)); // DES_set_key ((DES_cblock *)(key->data + 8), &(key->ks2)); // if (T_3K3DES == key->type) { diff --git a/armsrc/legicrf.c b/armsrc/legicrf.c index 14298a5f1..21b0c0a42 100644 --- a/armsrc/legicrf.c +++ b/armsrc/legicrf.c @@ -64,8 +64,7 @@ static uint32_t last_frame_end; /* ts of last bit of previews rx or tx frame */ //----------------------------------------------------------------------------- // I/O interface abstraction (FPGA -> ARM) //----------------------------------------------------------------------------- - -static inline uint8_t rx_byte_from_fpga(void) { +static uint8_t rx_byte_from_fpga(void) { for (;;) { WDT_HIT(); @@ -93,11 +92,7 @@ static inline uint8_t rx_byte_from_fpga(void) { // Note: The SSC receiver is never synchronized the calculation may be performed // on a i/q pair from two subsequent correlations, but does not matter. // Note: inlining this function would fail with -Os -#ifdef __OPTIMIZE_SIZE__ static int32_t sample_power(void) { -#else -static inline int32_t sample_power(void) { -#endif int32_t q = (int8_t)rx_byte_from_fpga(); q = ABS(q); int32_t i = (int8_t)rx_byte_from_fpga(); @@ -115,11 +110,7 @@ static inline int32_t sample_power(void) { // has a delay loop that aligns rx_bit calls to the TAG tx timeslots. // Note: inlining this function would fail with -Os -#ifdef __OPTIMIZE_SIZE__ static bool rx_bit(void) { -#else -static inline bool rx_bit(void) { -#endif int32_t power; for (size_t i = 0; i < 5; ++i) { @@ -138,7 +129,7 @@ static inline bool rx_bit(void) { // be circumvented, but the adventage over bitbang would be little. //----------------------------------------------------------------------------- -static inline void tx_bit(bool bit) { +static void tx_bit(bool bit) { // insert pause LOW(GPIO_SSC_DOUT); last_frame_end += RWD_TIME_PAUSE; diff --git a/armsrc/legicrfsim.c b/armsrc/legicrfsim.c index e2b06ba9b..35eefc56c 100644 --- a/armsrc/legicrfsim.c +++ b/armsrc/legicrfsim.c @@ -66,11 +66,7 @@ static uint32_t last_frame_end; /* ts of last bit of previews rx or tx frame */ // Returns true if a pulse/pause is received within timeout // Note: inlining this function would fail with -Os -#ifdef __OPTIMIZE_SIZE__ static bool wait_for(bool value, const uint32_t timeout) { -#else -static inline bool wait_for(bool value, const uint32_t timeout) { -#endif while ((bool)(AT91C_BASE_PIOA->PIO_PDSR & GPIO_SSC_DIN) != value) { if (GetCountSspClk() > timeout) { return false; @@ -88,7 +84,7 @@ static inline bool wait_for(bool value, const uint32_t timeout) { // - A bit length >80.2us is a 1 // - A bit length <80.2us is a 0 // - A bit length >148.6us is a code violation -static inline int8_t rx_bit(void) { +static int8_t rx_bit(void) { // backup ts for threshold calculation uint32_t bit_start = last_frame_end; @@ -132,11 +128,7 @@ static inline int8_t rx_bit(void) { // not mandatory but results in a cleaner signal. tx_frame will disable // the subcarrier when the frame is done. // Note: inlining this function would fail with -Os -#ifdef __OPTIMIZE_SIZE__ static void tx_bit(bool bit) { -#else -static inline void tx_bit(bool bit) { -#endif LED_C_ON(); if (bit) { diff --git a/armsrc/nprintf.c b/armsrc/nprintf.c index 645454b4e..1ce3842d3 100644 --- a/armsrc/nprintf.c +++ b/armsrc/nprintf.c @@ -127,7 +127,7 @@ typedef struct { // internal buffer output -static inline void _out_buffer(char character, void *buffer, size_t idx, size_t maxlen) { +static void _out_buffer(char character, void *buffer, size_t idx, size_t maxlen) { if (idx < maxlen) { ((char *)buffer)[idx] = character; } @@ -135,7 +135,7 @@ static inline void _out_buffer(char character, void *buffer, size_t idx, size_t // internal null output -static inline void _out_null(char character, void *buffer, size_t idx, size_t maxlen) { +static void _out_null(char character, void *buffer, size_t idx, size_t maxlen) { (void)character; (void)buffer; (void)idx; @@ -144,7 +144,7 @@ static inline void _out_null(char character, void *buffer, size_t idx, size_t ma // internal _putchar wrapper -static inline void _out_char(char character, void *buffer, size_t idx, size_t maxlen) { +static void _out_char(char character, void *buffer, size_t idx, size_t maxlen) { (void)buffer; (void)idx; (void)maxlen; @@ -155,7 +155,7 @@ static inline void _out_char(char character, void *buffer, size_t idx, size_t ma // internal output function wrapper -static inline void _out_fct(char character, void *buffer, size_t idx, size_t maxlen) { +static void _out_fct(char character, void *buffer, size_t idx, size_t maxlen) { (void)idx; (void)maxlen; if (character) { @@ -167,7 +167,7 @@ static inline void _out_fct(char character, void *buffer, size_t idx, size_t max // internal secure strlen // \return The length of the string (excluding the terminating 0) limited by 'maxsize' -static inline unsigned int _strnlen_s(const char *str, size_t maxsize) { +static unsigned int _strnlen_s(const char *str, size_t maxsize) { const char *s; for (s = str; *s && maxsize--; ++s); return (unsigned int)(s - str); @@ -176,7 +176,7 @@ static inline unsigned int _strnlen_s(const char *str, size_t maxsize) { // internal test if char is a digit (0-9) // \return true if char is a digit -static inline bool _is_digit(char ch) { +static bool _is_digit(char ch) { return (ch >= '0') && (ch <= '9'); }