Numworks Epsilon  1.4.1
Graphing Calculator Operating System
register.h File Reference
#include <stdint.h>
#include <assert.h>

Go to the source code of this file.

Classes

class  Register< T >
 

Macros

#define REGS_FIELD_R(name, type, high, low)   type get##name() volatile { return (type)getBitRange(high,low); };
 
#define REGS_FIELD_W(name, type, high, low)   void set##name(type v) volatile { setBitRange(high, low, (uint8_t)v); };
 
#define REGS_FIELD(name, type, high, low)   REGS_FIELD_R(name,type,high,low); REGS_FIELD_W(name,type,high,low);
 
#define REGS_TYPE_FIELD(name, high, low)   REGS_FIELD(name,name,high,low)
 
#define REGS_BOOL_FIELD(name, bit)   REGS_FIELD(name,bool,bit,bit)
 
#define REGS_BOOL_FIELD_R(name, bit)   REGS_FIELD_R(name,bool,bit,bit)
 
#define REGS_BOOL_FIELD_W(name, bit)   REGS_FIELD_W(name,bool,bit,bit)
 
#define REGS_REGISTER_AT(name, offset)   constexpr volatile name * name() const { return (class name *)(Base() + offset); };
 

Typedefs

typedef Register< uint8_tRegister8
 
typedef Register< uint16_tRegister16
 
typedef Register< uint32_tRegister32
 
typedef Register< uint64_tRegister64
 

Macro Definition Documentation

◆ REGS_BOOL_FIELD

#define REGS_BOOL_FIELD (   name,
  bit 
)    REGS_FIELD(name,bool,bit,bit)

Definition at line 56 of file register.h.

◆ REGS_BOOL_FIELD_R

#define REGS_BOOL_FIELD_R (   name,
  bit 
)    REGS_FIELD_R(name,bool,bit,bit)

Definition at line 57 of file register.h.

◆ REGS_BOOL_FIELD_W

#define REGS_BOOL_FIELD_W (   name,
  bit 
)    REGS_FIELD_W(name,bool,bit,bit)

Definition at line 58 of file register.h.

◆ REGS_FIELD

#define REGS_FIELD (   name,
  type,
  high,
  low 
)    REGS_FIELD_R(name,type,high,low); REGS_FIELD_W(name,type,high,low);

Definition at line 54 of file register.h.

◆ REGS_FIELD_R

#define REGS_FIELD_R (   name,
  type,
  high,
  low 
)    type get##name() volatile { return (type)getBitRange(high,low); };

Definition at line 52 of file register.h.

◆ REGS_FIELD_W

#define REGS_FIELD_W (   name,
  type,
  high,
  low 
)    void set##name(type v) volatile { setBitRange(high, low, (uint8_t)v); };

Definition at line 53 of file register.h.

◆ REGS_REGISTER_AT

#define REGS_REGISTER_AT (   name,
  offset 
)    constexpr volatile name * name() const { return (class name *)(Base() + offset); };

Definition at line 59 of file register.h.

◆ REGS_TYPE_FIELD

#define REGS_TYPE_FIELD (   name,
  high,
  low 
)    REGS_FIELD(name,name,high,low)

Definition at line 55 of file register.h.

Typedef Documentation

◆ Register16

Definition at line 48 of file register.h.

◆ Register32

Definition at line 49 of file register.h.

◆ Register64

Definition at line 50 of file register.h.

◆ Register8

Definition at line 47 of file register.h.