changeset 79:cecb0506f4b8

No point disabling IRQs inside the function calls since any pending IRQs happen when we return. The caller must do it.
author Daniel O'Connor <darius@dons.net.au>
date Sun, 07 Jul 2013 22:48:17 +0930
parents 4c1db877452b
children 1a4573062b37
files delay.c
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/delay.c	Tue Apr 23 20:46:37 2013 +0930
+++ b/delay.c	Sun Jul 07 22:48:17 2013 +0930
@@ -10,8 +10,6 @@
     uint32_t dly, cnt, clk_per_usec, max_dly;
     volatile uint32_t *DWT_CYCCNT = (uint32_t *)0xe0001004;
 
-    __disable_irq();
-
 #ifdef SYSCLK_FREQ_72MHz
     clk_per_usec = 72;
     max_dly = (1<<31) / clk_per_usec; /* Really half the maximum (still ~30 seconds at 72MHz) */
@@ -30,7 +28,5 @@
     /* Wait until we get to the stop count */
     while (*DWT_CYCCNT < dly)
 	;
-    
-    __enable_irq();
 }