diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-10-18 15:11:25 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-10-18 15:12:21 -0400 |
commit | 8f97a6061ad5e7a9fe42b98f5ec1e2fa8aa7051c (patch) | |
tree | 3106b624c61c660b31302a4a19aa14ea04d7d10a /wirish/wirish_time.h | |
parent | 66b204637594927f72e47d87d9c279682d1bd174 (diff) | |
download | librambutan-8f97a6061ad5e7a9fe42b98f5ec1e2fa8aa7051c.tar.gz librambutan-8f97a6061ad5e7a9fe42b98f5ec1e2fa8aa7051c.zip |
wirish: Clean up includes; other fixups.
Clean up various core files' includes to fit this pattern:
- Header files include what they use.
- CPP files include their header first
- Include order is libmaple proper headers, then wirish
headers (modulo CPP rule above).
wirish.h: Move HIGH and LOW to io.h, and the boolean and byte typedefs
into wirish_types.h. These don't belong in wirish.h.
Add include guards to wirish_debug.h. Oops.
wirish_digital.cpp: Use standard bool instead of "boolean".
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'wirish/wirish_time.h')
-rw-r--r-- | wirish/wirish_time.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wirish/wirish_time.h b/wirish/wirish_time.h index c37da87..ab225e8 100644 --- a/wirish/wirish_time.h +++ b/wirish/wirish_time.h @@ -32,9 +32,9 @@ #ifndef _TIME_H_ #define _TIME_H_ -#include "libmaple.h" -#include "nvic.h" +#include "libmaple_types.h" #include "systick.h" + #include "boards.h" #define US_PER_MS 1000 @@ -64,7 +64,7 @@ static inline uint32 micros(void) { } while (ms != millis()); /* SYSTICK_RELOAD_VAL is 1 less than the number of cycles it - actually takes to complete a SysTick reload */ + * actually takes to complete a SysTick reload */ res = (ms * US_PER_MS) + (SYSTICK_RELOAD_VAL + 1 - cycle_cnt) / CYCLES_PER_MICROSECOND; |