From 1e2e177f6dae62e040c674b617744c73be187062 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 6 May 2011 20:19:44 -0400 Subject: Finally getting rid of __read() and __write(). This brings util.h down to some bit manipulation macros, failure routines, and asserts. --- libmaple/util.h | 9 +-------- 1 file changed, 1 insertion(+), 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,17 +42,10 @@ 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 */ -- cgit v1.2.3