From 647f3c0375cd89e34e31d6f2679a56898eeaefa3 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Fri, 29 Mar 2013 19:19:49 -0300 Subject: [PATCH] atusb/fw/: get rid of some more "int"s No size change this time. --- atusb/fw/board.c | 9 +++++---- atusb/fw/board.h | 2 +- atusb/fw/mac.c | 4 ++-- atusb/fw/mac.h | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) 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);