diff --git a/atusb/fw/board.c b/atusb/fw/board.c index 03fd1c8..dc507e3 100644 --- a/atusb/fw/board.c +++ b/atusb/fw/board.c @@ -1,8 +1,8 @@ /* * fw/board.c - Board-specific functions (for boot loader and application) * - * Written 2011 by Werner Almesberger - * Copyright 2011 Werner Almesberger + * Written 2011, 2013 by Werner Almesberger + * Copyright 2011, 2013 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -11,6 +11,7 @@ */ +#include #include #include @@ -81,7 +82,7 @@ void reset_rf(void) } -void led(int on) +void led(bool on) { if (on) SET(LED); @@ -111,7 +112,7 @@ static char hex(uint8_t nibble) static void get_sernum(void) { uint8_t sig; - int i; + uint8_t i; for (i = 0; i != 10; i++) { sig = boot_signature_byte_get(i+0xe); diff --git a/atusb/fw/board.h b/atusb/fw/board.h index bb0b2cc..7cbdca6 100644 --- a/atusb/fw/board.h +++ b/atusb/fw/board.h @@ -82,7 +82,7 @@ void reset_cpu(void); uint8_t read_irq(void); void slp_tr(void); -void led(int on); +void led(bool on); void panic(void); uint64_t timer_read(void); diff --git a/atusb/fw/mac.c b/atusb/fw/mac.c index 9030dce..86f57f3 100644 --- a/atusb/fw/mac.c +++ b/atusb/fw/mac.c @@ -22,7 +22,7 @@ #include "mac.h" -int (*mac_irq)(void) = NULL; +bool (*mac_irq)(void) = NULL; static uint8_t rx_buf[MAX_PSDU+2]; /* PHDR+payload+LQ */ @@ -64,7 +64,7 @@ static void rx_done(void *user) } -static int handle_irq(void) +static bool handle_irq(void) { uint8_t irq; uint8_t size, i; diff --git a/atusb/fw/mac.h b/atusb/fw/mac.h index 6b06730..ca7caff 100644 --- a/atusb/fw/mac.h +++ b/atusb/fw/mac.h @@ -17,7 +17,7 @@ #include -extern int (*mac_irq)(void); +extern bool (*mac_irq)(void); bool mac_rx(int on); bool mac_tx(uint16_t flags, uint16_t len);