aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-05 17:59:14 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-07 03:38:29 -0400
commitab6814b687a670475fcf9be2be2af30f72904320 (patch)
tree7dc28052181ab938b5dfad5af2c15072b7a96e19
parentadbbbc19369f64d64f72d9417a0bf0272d1ba497 (diff)
downloadlibrambutan-ab6814b687a670475fcf9be2be2af30f72904320.tar.gz
librambutan-ab6814b687a670475fcf9be2be2af30f72904320.zip
wirish/boards.h: Optionally derive SYSTICK_RELOAD_VAL.
It's stupid to make everyone keep this around. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r--wirish/include/wirish/boards.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/wirish/include/wirish/boards.h b/wirish/include/wirish/boards.h
index 1375512..73d5509 100644
--- a/wirish/include/wirish/boards.h
+++ b/wirish/include/wirish/boards.h
@@ -113,6 +113,9 @@ bool boardUsesPin(uint8 pin);
/* Set derived definitions */
#define CLOCK_SPEED_MHZ CYCLES_PER_MICROSECOND
#define CLOCK_SPEED_HZ (CLOCK_SPEED_MHZ * 1000000UL)
+#ifndef SYSTICK_RELOAD_VAL
+#define SYSTICK_RELOAD_VAL (1000 * CYCLES_PER_MICROSECOND - 1)
+#endif
/**
* @brief Does the board break out a USART/UART's RX and TX pins?