aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-05-19 16:39:31 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-05-19 18:45:46 -0400
commit7ff47e87734c9ca7dc0c3939a8dabc3e29035d53 (patch)
tree1a82ffd6c842461b239ba1ede1c885ee88155205 /libmaple
parent2611f59cbce88ff4955a7f5d4ee6201472e6cd27 (diff)
downloadlibrambutan-7ff47e87734c9ca7dc0c3939a8dabc3e29035d53.tar.gz
librambutan-7ff47e87734c9ca7dc0c3939a8dabc3e29035d53.zip
systick.h: Doxygen comments
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/systick.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/libmaple/systick.h b/libmaple/systick.h
index dfe3429..a589bc5 100644
--- a/libmaple/systick.h
+++ b/libmaple/systick.h
@@ -76,20 +76,33 @@ typedef struct systick_reg_map {
extern volatile uint32 systick_uptime_millis;
/**
- *
+ * @brief Returns the system uptime, in milliseconds.
*/
static inline uint32 systick_uptime(void) {
return systick_uptime_millis;
}
+
void systick_init(uint32 reload_val);
void systick_disable();
void systick_enable();
+/**
+ * @brief Returns the current value of the SysTick counter.
+ */
static inline uint32 systick_get_count(void) {
return SYSTICK_BASE->CNT;
}
+/**
+ * @brief Check for underflow.
+ *
+ * This function returns 1 if the SysTick timer has counter to 0 since
+ * the last time it was called. However, any reads of any part of the
+ * SysTick Control and Status Register SYSTICK_BASE->CSR will
+ * interfere with this functionality. See the ARM Cortex M3 Technical
+ * Reference Manual for more details (e.g. Table 8-3 in revision r1p1).
+ */
static inline uint32 systick_check_underflow(void) {
return SYSTICK_BASE->CSR & SYSTICK_CSR_COUNTFLAG;
}