diff options
author | Perry Hung <iperry@alum.mit.edu> | 2010-08-04 08:52:30 -0400 |
---|---|---|
committer | Perry Hung <iperry@alum.mit.edu> | 2010-08-04 08:52:30 -0400 |
commit | d2494611156c4ba477a1bbd1b07ba0cfc14b29e4 (patch) | |
tree | 48782014152efa392ac0689c4098e089da52c82c /libmaple/util.h | |
parent | 2b7a1b40c96525cd4c6324f6e9d53845fb07a55f (diff) | |
download | librambutan-d2494611156c4ba477a1bbd1b07ba0cfc14b29e4.tar.gz librambutan-d2494611156c4ba477a1bbd1b07ba0cfc14b29e4.zip |
Cleaned up wirish/time, some interrupt handling refactoring:
Fixed millis(), it was just wrong, before.
Added micros(), not extensively tested.
New implementation of delayMicroseconds(). Should be more consistent
now.
Added a handful of nvic routines to enable/disable interrupts.
Cleaned up systick
Diffstat (limited to 'libmaple/util.h')
-rw-r--r-- | libmaple/util.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libmaple/util.h b/libmaple/util.h index 8cfc60c..c336e21 100644 --- a/libmaple/util.h +++ b/libmaple/util.h @@ -48,8 +48,6 @@ #define BITBAND_PERI_BASE 0x42000000 #define BITBAND_PERI(a,b) ((BITBAND_PERI_BASE + (a-BITBAND_PERI_REF)*32 + (b*4))) // Convert PERI address -#define COUNTFLAG *((volatile unsigned char*) (BITBAND_PERI(SYSTICK_CSR,2))) - #define REG_SET(reg, val) (*(volatile uint32*)(reg) = (val)) #define REG_SET_BIT(reg, bit) (*(volatile uint32*)(reg) |= BIT(bit)) #define REG_CLEAR_BIT(reg, bit) (*(volatile uint32*)(reg) &= ~BIT(bit)) |