diff --git a/util/FIFO.h b/util/FIFO.h index b9850a1..ee1abf8 100644 --- a/util/FIFO.h +++ b/util/FIFO.h @@ -43,7 +43,7 @@ inline void fifo_flush(FIFOBuffer *f) { f->head = f->tail; } -inline bool fifo_isempty_locked(const FIFOBuffer *f) { +static inline bool fifo_isempty_locked(const FIFOBuffer *f) { bool result; ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { result = fifo_isempty(f); @@ -51,7 +51,7 @@ inline bool fifo_isempty_locked(const FIFOBuffer *f) { return result; } -inline bool fifo_isfull_locked(const FIFOBuffer *f) { +static inline bool fifo_isfull_locked(const FIFOBuffer *f) { bool result; ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { result = fifo_isfull(f); @@ -59,13 +59,13 @@ inline bool fifo_isfull_locked(const FIFOBuffer *f) { return result; } -inline void fifo_push_locked(FIFOBuffer *f, unsigned char c) { +static inline void fifo_push_locked(FIFOBuffer *f, unsigned char c) { ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { fifo_push(f, c); } } -inline unsigned char fifo_pop_locked(FIFOBuffer *f) { +static inline unsigned char fifo_pop_locked(FIFOBuffer *f) { unsigned char c; ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { c = fifo_pop(f); @@ -82,4 +82,4 @@ inline size_t fifo_len(FIFOBuffer *f) { return f->end - f->begin; } -#endif \ No newline at end of file +#endif diff --git a/util/time.h b/util/time.h index eb79970..ca5059a 100644 --- a/util/time.h +++ b/util/time.h @@ -12,7 +12,7 @@ typedef int32_t mtime_t; volatile ticks_t _clock; -inline ticks_t timer_clock(void) { +static inline ticks_t timer_clock(void) { ticks_t result; ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { @@ -31,7 +31,7 @@ inline void cpu_relax(void) { // Do nothing! } -inline void delay_ms(unsigned long ms) { +static inline void delay_ms(unsigned long ms) { ticks_t start = timer_clock(); unsigned long n_ticks = ms_to_ticks(ms); while (timer_clock() - start < n_ticks) { @@ -40,4 +40,4 @@ inline void delay_ms(unsigned long ms) { } -#endif \ No newline at end of file +#endif