Fix indents and switch syntax

Fix indentions in `spi_byte()` and add missing space after `switch`
keywords.
This commit is contained in:
finga 2021-09-11 00:21:01 +02:00
parent 6eb515e2d4
commit e2d30d7050

View file

@ -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;