mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 14:30:35 +02:00
flashi/spi: Use tabs instead of spaces.
Purely cosmetic. No idea when this sneaked in here.
This commit is contained in:
parent
37a4f00e41
commit
15b15b9524
@ -39,7 +39,7 @@ static bool flash_can_write(uint16_t size)
|
|||||||
static void flash_write(const uint8_t *buf, uint16_t size)
|
static void flash_write(const uint8_t *buf, uint16_t size)
|
||||||
{
|
{
|
||||||
static uint8_t last;
|
static uint8_t last;
|
||||||
const uint8_t *p;
|
const uint8_t *p;
|
||||||
|
|
||||||
for (p = buf; p != buf+size; p++) {
|
for (p = buf; p != buf+size; p++) {
|
||||||
if (!(payload & (SPM_PAGESIZE-1))) {
|
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_page_write(payload-SPM_PAGESIZE);
|
||||||
boot_spm_busy_wait();
|
boot_spm_busy_wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,9 +34,9 @@ void spi_begin(void)
|
|||||||
uint8_t spi_io(uint8_t v)
|
uint8_t spi_io(uint8_t v)
|
||||||
{
|
{
|
||||||
// while (!(UCSR1A & 1 << UDRE1));
|
// while (!(UCSR1A & 1 << UDRE1));
|
||||||
UDR1 = v;
|
UDR1 = v;
|
||||||
while (!(UCSR1A & 1 << RXC1));
|
while (!(UCSR1A & 1 << RXC1));
|
||||||
return UDR1;
|
return UDR1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ void spi_recv_block(uint8_t *buf, uint8_t n)
|
|||||||
{
|
{
|
||||||
if (!n)
|
if (!n)
|
||||||
return;
|
return;
|
||||||
UDR1 = 0;
|
UDR1 = 0;
|
||||||
while (--n) {
|
while (--n) {
|
||||||
while (!(UCSR1A & 1 << RXC1));
|
while (!(UCSR1A & 1 << RXC1));
|
||||||
*buf++ = UDR1;
|
*buf++ = UDR1;
|
||||||
|
Loading…
Reference in New Issue
Block a user