diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-05-06 20:19:44 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-05-06 20:19:44 -0400 |
commit | 1e2e177f6dae62e040c674b617744c73be187062 (patch) | |
tree | a43f7e0fb3650ca54f245b750a078a0e8c356504 /libmaple | |
parent | 9016d46134324cdb6b44d52f3adf639bc9c4c186 (diff) | |
download | librambutan-1e2e177f6dae62e040c674b617744c73be187062.tar.gz librambutan-1e2e177f6dae62e040c674b617744c73be187062.zip |
Finally getting rid of __read() and __write().
This brings util.h down to some bit manipulation macros, failure
routines, and asserts.
Diffstat (limited to 'libmaple')
-rw-r--r-- | libmaple/util.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libmaple/util.h b/libmaple/util.h index 4c47764..f54f3fd 100644 --- a/libmaple/util.h +++ b/libmaple/util.h @@ -42,18 +42,11 @@ extern "C"{ #define BIT(shift) (1UL << (shift)) #define BIT_MASK_SHIFT(mask, shift) ((mask) << (shift)) -/* Bits m to n of x */ +/** Bits m to n of x */ #define GET_BITS(x, m, n) ((((uint32)x) << (31 - (n))) >> ((31 - (n)) + (m))) #define IS_POWER_OF_TWO(v) (v && !(v & (v - 1))) /* - * Register reads and writes - */ - -#define __read(reg) (*(__io uint32*)(reg)) -#define __write(reg, value) (*(__io uint32*)(reg) = (value)) - -/* * Failure routines */ |