IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2013-03-29 23:19:49 (10 years 11 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 647f3c0375cd89e34e31d6f2679a56898eeaefa3 |
Message: | atusb/fw/: get rid of some more "int"s No size change this time. |
Files: |
atusb/fw/board.c (4 diffs) atusb/fw/board.h (1 diff) atusb/fw/mac.c (2 diffs) atusb/fw/mac.h (1 diff) |
Change Details
atusb/fw/board.c | ||
---|---|---|
1 | 1 | /* |
2 | 2 | * fw/board.c - Board-specific functions (for boot loader and application) |
3 | 3 | * |
4 | * Written 2011 by Werner Almesberger | |
5 | * Copyright 2011 Werner Almesberger | |
4 | * Written 2011, 2013 by Werner Almesberger | |
5 | * Copyright 2011, 2013 Werner Almesberger | |
6 | 6 | * |
7 | 7 | * This program is free software; you can redistribute it and/or modify |
8 | 8 | * it under the terms of the GNU General Public License as published by |
... | ... | |
11 | 11 | */ |
12 | 12 | |
13 | 13 | |
14 | #include <stdbool.h> | |
14 | 15 | #include <stdint.h> |
15 | 16 | |
16 | 17 | #include <avr/io.h> |
... | ... | |
81 | 82 | } |
82 | 83 | |
83 | 84 | |
84 | void led(int on) | |
85 | void led(bool on) | |
85 | 86 | { |
86 | 87 | if (on) |
87 | 88 | SET(LED); |
... | ... | |
111 | 112 | static void get_sernum(void) |
112 | 113 | { |
113 | 114 | uint8_t sig; |
114 | int i; | |
115 | uint8_t i; | |
115 | 116 | |
116 | 117 | for (i = 0; i != 10; i++) { |
117 | 118 | sig = boot_signature_byte_get(i+0xe); |
atusb/fw/board.h | ||
---|---|---|
82 | 82 | uint8_t read_irq(void); |
83 | 83 | void slp_tr(void); |
84 | 84 | |
85 | void led(int on); | |
85 | void led(bool on); | |
86 | 86 | void panic(void); |
87 | 87 | |
88 | 88 | uint64_t timer_read(void); |
atusb/fw/mac.c | ||
---|---|---|
22 | 22 | #include "mac.h" |
23 | 23 | |
24 | 24 | |
25 | int (*mac_irq)(void) = NULL; | |
25 | bool (*mac_irq)(void) = NULL; | |
26 | 26 | |
27 | 27 | |
28 | 28 | static uint8_t rx_buf[MAX_PSDU+2]; /* PHDR+payload+LQ */ |
... | ... | |
64 | 64 | } |
65 | 65 | |
66 | 66 | |
67 | static int handle_irq(void) | |
67 | static bool handle_irq(void) | |
68 | 68 | { |
69 | 69 | uint8_t irq; |
70 | 70 | uint8_t size, i; |
atusb/fw/mac.h | ||
---|---|---|
17 | 17 | #include <stdint.h> |
18 | 18 | |
19 | 19 | |
20 | extern int (*mac_irq)(void); | |
20 | extern bool (*mac_irq)(void); | |
21 | 21 | |
22 | 22 | bool mac_rx(int on); |
23 | 23 | bool mac_tx(uint16_t flags, uint16_t len); |