aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/systick.c
diff options
context:
space:
mode:
authorMichael Hope <michael.hope@linaro.org>2010-09-29 20:45:57 +1300
committerMichael Hope <michael.hope@linaro.org>2010-09-29 20:45:57 +1300
commit6fcd4cd306dbecf56f5b0b506a3c23762d1219fa (patch)
tree467125eca5a2e6706001cad8e09bc475e58a12d9 /libmaple/systick.c
parent368e4fc1662c2594b2a0908900713a2555a3ed8e (diff)
parentadde11b099ff5dad176e410279d21feac39d2c7e (diff)
downloadlibrambutan-6fcd4cd306dbecf56f5b0b506a3c23762d1219fa.tar.gz
librambutan-6fcd4cd306dbecf56f5b0b506a3c23762d1219fa.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'libmaple/systick.c')
-rw-r--r--libmaple/systick.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libmaple/systick.c b/libmaple/systick.c
index 9fbb152..12a3e22 100644
--- a/libmaple/systick.c
+++ b/libmaple/systick.c
@@ -1,4 +1,4 @@
-/* *****************************************************************************
+/******************************************************************************
* The MIT License
*
* Copyright (c) 2010 Perry Hung.
@@ -20,12 +20,12 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- * ****************************************************************************/
+ *****************************************************************************/
/**
- * @file systick.c
+ * @file systick.c
*
- * @brief System timer interrupt handler and initialization routines
+ * @brief System timer interrupt handler and initialization routines
*/
#include "libmaple.h"
@@ -45,24 +45,24 @@ void systick_init(uint32 reload_val) {
/* Set the reload counter to tick every 1ms */
__write(SYSTICK_RELOAD, reload_val);
- /* Clock the system timer with the core clock
- * and turn it on, interrrupt every 1ms to keep track of millis()*/
+ /* Clock the system timer with the core clock and turn it on,
+ * interrrupt every 1ms to keep track of millis() */
__write(SYSTICK_CSR, SYSTICK_SRC_HCLK |
- SYSTICK_ENABLE |
- SYSTICK_TICKINT);
+ SYSTICK_ENABLE |
+ SYSTICK_TICKINT);
}
void systick_disable() {
- /* clock the system timer with the core clock, but don't turn it on
- or enable interrupt. */
- __write(SYSTICK_CSR, SYSTICK_SRC_HCLK);
+ /* clock the system timer with the core clock, but don't turn it
+ on or enable interrupt. */
+ __write(SYSTICK_CSR, SYSTICK_SRC_HCLK);
}
void systick_resume() {
- /* re-enable init registers without changing relead_val */
- __write(SYSTICK_CSR, SYSTICK_SRC_HCLK |
- SYSTICK_ENABLE |
- SYSTICK_TICKINT);
+ /* re-enable init registers without changing relead_val */
+ __write(SYSTICK_CSR, SYSTICK_SRC_HCLK |
+ SYSTICK_ENABLE |
+ SYSTICK_TICKINT);
}
void SysTickHandler(void) {