diff --git a/atusb/fw/flash.c b/atusb/fw/flash.c index 136f3da..1f8e59d 100644 --- a/atusb/fw/flash.c +++ b/atusb/fw/flash.c @@ -39,7 +39,7 @@ static bool flash_can_write(uint16_t size) static void flash_write(const uint8_t *buf, uint16_t size) { static uint8_t last; - const uint8_t *p; + const uint8_t *p; for (p = buf; p != buf+size; p++) { if (!(payload & (SPM_PAGESIZE-1))) { @@ -57,7 +57,7 @@ static void flash_write(const uint8_t *buf, uint16_t size) boot_page_write(payload-SPM_PAGESIZE); boot_spm_busy_wait(); } - } + } } diff --git a/atusb/fw/spi.c b/atusb/fw/spi.c index ded5673..ef6bced 100644 --- a/atusb/fw/spi.c +++ b/atusb/fw/spi.c @@ -34,9 +34,9 @@ void spi_begin(void) uint8_t spi_io(uint8_t v) { // while (!(UCSR1A & 1 << UDRE1)); - UDR1 = v; - while (!(UCSR1A & 1 << RXC1)); - return UDR1; + UDR1 = v; + while (!(UCSR1A & 1 << RXC1)); + return UDR1; } @@ -51,7 +51,7 @@ void spi_recv_block(uint8_t *buf, uint8_t n) { if (!n) return; - UDR1 = 0; + UDR1 = 0; while (--n) { while (!(UCSR1A & 1 << RXC1)); *buf++ = UDR1;