mirror of
https://github.com/markqvist/OpenModem.git
synced 2024-12-28 08:59:36 -05:00
Fix some compile-time warnings.
This commit is contained in:
parent
373e4d8274
commit
121e9cf5de
@ -43,7 +43,7 @@ inline void fifo_flush(FIFOBuffer *f) {
|
|||||||
f->head = f->tail;
|
f->head = f->tail;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool fifo_isempty_locked(const FIFOBuffer *f) {
|
static inline bool fifo_isempty_locked(const FIFOBuffer *f) {
|
||||||
bool result;
|
bool result;
|
||||||
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
||||||
result = fifo_isempty(f);
|
result = fifo_isempty(f);
|
||||||
@ -51,7 +51,7 @@ inline bool fifo_isempty_locked(const FIFOBuffer *f) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool fifo_isfull_locked(const FIFOBuffer *f) {
|
static inline bool fifo_isfull_locked(const FIFOBuffer *f) {
|
||||||
bool result;
|
bool result;
|
||||||
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
||||||
result = fifo_isfull(f);
|
result = fifo_isfull(f);
|
||||||
@ -59,13 +59,13 @@ inline bool fifo_isfull_locked(const FIFOBuffer *f) {
|
|||||||
return result;
|
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) {
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
||||||
fifo_push(f, c);
|
fifo_push(f, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned char fifo_pop_locked(FIFOBuffer *f) {
|
static inline unsigned char fifo_pop_locked(FIFOBuffer *f) {
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
||||||
c = fifo_pop(f);
|
c = fifo_pop(f);
|
||||||
|
@ -12,7 +12,7 @@ typedef int32_t mtime_t;
|
|||||||
|
|
||||||
volatile ticks_t _clock;
|
volatile ticks_t _clock;
|
||||||
|
|
||||||
inline ticks_t timer_clock(void) {
|
static inline ticks_t timer_clock(void) {
|
||||||
ticks_t result;
|
ticks_t result;
|
||||||
|
|
||||||
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
||||||
@ -31,7 +31,7 @@ inline void cpu_relax(void) {
|
|||||||
// Do nothing!
|
// Do nothing!
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void delay_ms(unsigned long ms) {
|
static inline void delay_ms(unsigned long ms) {
|
||||||
ticks_t start = timer_clock();
|
ticks_t start = timer_clock();
|
||||||
unsigned long n_ticks = ms_to_ticks(ms);
|
unsigned long n_ticks = ms_to_ticks(ms);
|
||||||
while (timer_clock() - start < n_ticks) {
|
while (timer_clock() - start < n_ticks) {
|
||||||
|
Loading…
Reference in New Issue
Block a user