add Wpedantic

This commit is contained in:
King Kévin 2016-03-23 09:57:02 +01:00
parent 6a64bc876c
commit 18ad87ab15
3 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ DEFS += -DSTM32F1 -D$(BOARD)
# C flags
CFLAGS += -Os -g
CFLAGS += -Wall -Werror -Wundef -Wextra -Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes
CFLAGS += -std=c99 -Wpedantic -Wall -Werror -Wundef -Wextra -Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes
CFLAGS += -fno-common -ffunction-sections -fdata-sections
CFLAGS += -I. -I$(INCLUDE_DIR) $(patsubst %,-I%,$(LIB))
CFLAGS += $(DEFS)

View File

@ -57,7 +57,7 @@
* the second SPI bit determines if the WS2812b bit is a 0 or 1
* the third SPI bit is the last part of the WS2812b bit frame, which is always low
* only the first 24 bits (3*8) are used */
#define WS2812B_SPI_TEMPLATE 0b10010010010010010010010000000000
#define WS2812B_SPI_TEMPLATE 0x92492400 //0b10010010010010010010010000000000
uint8_t ws2812b_data[WS2812B_LEDS*3*3+40*3/8] = {0}; // SPI encode data to be shifted out for WS2812b + the 50us reset
static volatile bool transmit_flag = false; // is transmission ongoing
@ -81,7 +81,7 @@ void ws2812b_set_rgb(uint16_t led, uint8_t red, uint8_t green, uint8_t blue)
for (uint8_t color=0; color<LENGTH(colors); color++) {
uint32_t bits_color = WS2812B_SPI_TEMPLATE; // template to encode the bits in
for (uint8_t bit=0; bit<8; bit++) {
bits_color |= ((colors[color]>>bit)&0b1)<<(bit*3+9); // encode the data bits in the pattern
bits_color |= ((colors[color]>>bit)&0x1)<<(bit*3+9); // encode the data bits in the pattern
}
// store pattern
ws2812b_data[led*3*3+color*3+0] = (bits_color>>24);

View File

@ -51,7 +51,7 @@
#define I2C_PIN_SCL GPIO_I2C1_SCL
/** @} */
/** DS1307 I2C address (fixed) */
#define I2C_ADDR 0b1101000
#define I2C_ADDR 0x68 //0b1101000
void rtc_setup(void)
{