RSeries astromech firmware
EEPROMSettings.h File Reference
#include "ReelTwo.h"
#include <EEPROM.h>
+ Include dependency graph for EEPROMSettings.h:

Go to the source code of this file.

Classes

class  EEPROMSettings< T, VERSION >
 

Macros

#define EEPROM_SIZE   EEPROM.length()
 
#define BMAPWORD_GRANULARITY   (sizeof(BMAPWORD))
 
#define BMAPWORD_BIT_SIZE   (sizeof(BMAPWORD) * 8)
 
#define BIT_MAPWORD(bitpos)   (0x1L << (BMAPWORD_BIT_SIZE - 1 - (bitpos)))
 
#define SET_MAPWORD_BIT(value, bit)
 
#define MAPWORD_BIT(value)   ((usedBitmap[(value) / sizeof(usedBitmap[0])] & BIT_MAPWORD((value) % sizeof(usedBitmap[0]))) != 0)
 

Macro Definition Documentation

◆ BIT_MAPWORD

#define BIT_MAPWORD (   bitpos)    (0x1L << (BMAPWORD_BIT_SIZE - 1 - (bitpos)))

◆ BMAPWORD_BIT_SIZE

#define BMAPWORD_BIT_SIZE   (sizeof(BMAPWORD) * 8)

◆ BMAPWORD_GRANULARITY

#define BMAPWORD_GRANULARITY   (sizeof(BMAPWORD))

◆ EEPROM_SIZE

#define EEPROM_SIZE   EEPROM.length()

◆ MAPWORD_BIT

#define MAPWORD_BIT (   value)    ((usedBitmap[(value) / sizeof(usedBitmap[0])] & BIT_MAPWORD((value) % sizeof(usedBitmap[0]))) != 0)

◆ SET_MAPWORD_BIT

#define SET_MAPWORD_BIT (   value,
  bit 
)
Value:
{\
uint8_t bitpos = (value) % sizeof(usedBitmap[0]); \
uint8_t wordpos = (value) / sizeof(usedBitmap[0]); \
usedBitmap[wordpos] = (usedBitmap[wordpos] & ~(BIT_MAPWORD(bitpos))) | (uint32_t(bit) << (BMAPWORD_BIT_SIZE - 1 - bitpos)); }
BMAPWORD_BIT_SIZE
#define BMAPWORD_BIT_SIZE
BIT_MAPWORD
#define BIT_MAPWORD(bitpos)