0.3.1
Accessors

Macros

#define MEMORY_READ(t, x)   (*(volatile uint ## t ## _t *)(x))
 
#define MEMORY_WRITE(t, x, y)
 
#define MEMORY_WRITE_AND(t, x, y)
 
#define MEMORY_WRITE_OR(t, x, y)
 

Detailed Description

Macro Definition Documentation

◆ MEMORY_READ

#define MEMORY_READ (   t,
 
)    (*(volatile uint ## t ## _t *)(x))

Read value of size t from address x.

Parameters
tThe bit count: 8, 16, or 32.
xThe byte offset.

◆ MEMORY_WRITE

#define MEMORY_WRITE (   t,
  x,
 
)
Value:
do { \
(*(volatile uint ## t ## _t *)(x) = (y)); \
} while (false)

Write value y to address x of size t.

Parameters
tThe bit count: 8, 16, or 32.
xThe byte offset.
yThe value to write.

◆ MEMORY_WRITE_AND

#define MEMORY_WRITE_AND (   t,
  x,
 
)
Value:
do { \
(*(volatile uint ## t ## _t *)(x) &= (y)); \
} while (false)

Bitwise AND value y to address x of size t.

Parameters
tThe bit count: 8, 16, or 32.
xThe byte offset.
yThe value to bitwise AND.

◆ MEMORY_WRITE_OR

#define MEMORY_WRITE_OR (   t,
  x,
 
)
Value:
do { \
(*(volatile uint ## t ## _t *)(x) |= (y)); \
} while (false)

Bitwise OR value y to address x of size t.

Parameters
tThe bit count: 8, 16, or 32.
xThe byte offset.
yThe value to bitwise OR.