Set compiler flag -pedantic
This commit is contained in:
parent
4dfb0d7edf
commit
1f668b6032
|
|
@ -7,7 +7,7 @@ OBJCOPY = avr-objcopy
|
||||||
AVRDUDE ?= avrdude
|
AVRDUDE ?= avrdude
|
||||||
|
|
||||||
# Compiler and linker flags
|
# Compiler and linker flags
|
||||||
CFLAGS = -Wall -std=c11 -Os
|
CFLAGS = -Wall -pedantic -std=c11 -Os
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# Target platform and programmer
|
# Target platform and programmer
|
||||||
|
|
|
||||||
|
|
@ -16,19 +16,19 @@
|
||||||
static inline void BIT_SET(volatile uint8_t *target, uint8_t bit) __attribute__((always_inline));
|
static inline void BIT_SET(volatile uint8_t *target, uint8_t bit) __attribute__((always_inline));
|
||||||
static inline void BIT_SET(volatile uint8_t *target, uint8_t bit){
|
static inline void BIT_SET(volatile uint8_t *target, uint8_t bit){
|
||||||
*target |= (1<<bit);
|
*target |= (1<<bit);
|
||||||
};
|
}
|
||||||
|
|
||||||
// set clear
|
// set clear
|
||||||
static inline void BIT_CLEAR(volatile uint8_t *target, uint8_t bit) __attribute__((always_inline));
|
static inline void BIT_CLEAR(volatile uint8_t *target, uint8_t bit) __attribute__((always_inline));
|
||||||
static inline void BIT_CLEAR(volatile uint8_t *target, uint8_t bit){
|
static inline void BIT_CLEAR(volatile uint8_t *target, uint8_t bit){
|
||||||
*target &= ~(1<<bit);
|
*target &= ~(1<<bit);
|
||||||
};
|
}
|
||||||
|
|
||||||
// bit toogle
|
// bit toogle
|
||||||
static inline void BIT_TOGGLE(volatile uint8_t *target, uint8_t bit) __attribute__((always_inline));
|
static inline void BIT_TOGGLE(volatile uint8_t *target, uint8_t bit) __attribute__((always_inline));
|
||||||
static inline void BIT_TOGGLE(volatile uint8_t *target, uint8_t bit){
|
static inline void BIT_TOGGLE(volatile uint8_t *target, uint8_t bit){
|
||||||
*target ^= (1<<bit);
|
*target ^= (1<<bit);
|
||||||
};
|
}
|
||||||
|
|
||||||
// set bit by boolean
|
// set bit by boolean
|
||||||
static inline void BIT_BOOL_SET(volatile uint8_t *target, uint8_t bit, bool enable) __attribute__((always_inline));
|
static inline void BIT_BOOL_SET(volatile uint8_t *target, uint8_t bit, bool enable) __attribute__((always_inline));
|
||||||
|
|
@ -38,6 +38,6 @@ static inline void BIT_BOOL_SET(volatile uint8_t *target, uint8_t bit, bool enab
|
||||||
}else{
|
}else{
|
||||||
BIT_CLEAR(target, bit);
|
BIT_CLEAR(target, bit);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
#endif /* BITIO_H_ */
|
#endif /* BITIO_H_ */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue