From e2d30d705077ff98712832bce71b2e91a53272d7 Mon Sep 17 00:00:00 2001 From: finga Date: Sat, 11 Sep 2021 00:21:01 +0200 Subject: [PATCH] Fix indents and switch syntax Fix indentions in `spi_byte()` and add missing space after `switch` keywords. --- firmware/src/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/firmware/src/main.c b/firmware/src/main.c index cafa3c7..fac89de 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -104,10 +104,10 @@ void spi_init(void) { } uint8_t spi_byte(uint8_t data) { - SPDR = data; - while(!(SPSR & (1 << SPIF))); - return SPDR; - } + SPDR = data; + while(!(SPSR & (1 << SPIF))); + return SPDR; +} void lcd_write(uint8_t data) { SPI_PORT &= ~(1 << SPI_SS); @@ -256,7 +256,7 @@ static void lcd_home(void) { bool ch3_selected = false; bool setup_selected = false; - switch(home_state) { + switch (home_state) { case ch1: ch1_selected = true; break; @@ -425,7 +425,7 @@ static void lcd_setup(void) { } static void change_state(enum state new_state) { - switch(new_state) { + switch (new_state) { case home: lcd_home(); current_state = home; @@ -500,7 +500,7 @@ static void update_state(enum input event) { ISR(PCINT0_vect) { cli(); - switch(enc) { + switch (enc) { case 0: if (ENC_A && !ENC_B) enc = 1;