aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/systick.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/systick.h')
-rw-r--r--src/lib/systick.h37
1 files changed, 31 insertions, 6 deletions
diff --git a/src/lib/systick.h b/src/lib/systick.h
index 42d33d0..3d846ef 100644
--- a/src/lib/systick.h
+++ b/src/lib/systick.h
@@ -1,15 +1,40 @@
+/* *****************************************************************************
+ * 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Created: 12/18/09 02:37:37
+ * Copyright (c) 2009 Perry L. Hung. All rights reserved.
+ *
+ * ****************************************************************************/
+
+/**
+ * @file systick.h
+ *
+ * @brief Various system timer definitions
+ */
+
#ifndef _SYSTICK_H_
#define _SYSTICK_H_
-#include <inttypes.h>
-#include "util.h"
+
+#include "libmaple.h"
/* To the ARM technical manual... there's nearly nothing on the systick
* timer in the stm32 manual */
-#define SYSTICK_CSR *(volatile int*)0xE000E010 // Control and status register
-#define SYSTICK_RELOAD *(volatile int*)0xE000E014 // Reload value register
-#define SYSTICK_CNT *(volatile int*)0xE000E018 // Current value register
-#define SYSTICK_CALIB *(volatile int*)0xE000E01C // Calibration value register
+#define SYSTICK_CSR 0xE000E010 // Control and status register
+#define SYSTICK_RELOAD 0xE000E014 // Reload value register
+#define SYSTICK_CNT 0xE000E018 // Current value register
+#define SYSTICK_CALIB 0xE000E01C // Calibration value register
#define SYSTICK_SRC_HCLK BIT(2) // Use core clock
#define SYSTICK_TICKINT BIT(1) // Interrupt on systick countdown