Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1791f539 authored by Jesper Nilsson's avatar Jesper Nilsson
Browse files

CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h

- Add ifdef around macros to read and write hardware registers
- Add parens around REG_READ expression to avoid possible precedence errors.
- Remove useless CVS id tag.
parent b8ed6b4d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
/* $Id: reg_rdwr.h,v 1.6 2005/04/24 18:30:58 starvik Exp $
 *
/*
 * Read/write register macros used by *_defs.h
 */

#ifndef reg_rdwr_h
#define reg_rdwr_h

#ifndef REG_READ
#define REG_READ(type, addr) (*((volatile type *) (addr)))
#endif

#define REG_READ(type, addr) *((volatile type *) (addr))

#ifndef REG_WRITE
#define REG_WRITE(type, addr, val) \
   do { *((volatile type *) (addr)) = (val); } while(0)
#endif

#endif