Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL > Class Template Reference
Inheritance diagram for TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >:
EEPROMStoredBitSet_DefaultHW

Protected Member Functions

 TivaEEPROMHwDefs (uint8_t block_start, uint8_t block_count)
 For the Tiva 123 use block_count as multiple of 2, for Tiva 129 use multiple of 8.
 
unsigned physical_cell_count ()
 
void write_cell (unsigned cell_offset, eeprom_t value)
 
eeprom_t read_cell (unsigned cell_offset)
 

Static Protected Member Functions

static constexpr unsigned bits_per_cell ()
 
static constexpr unsigned virtual_cell_count ()
 
- Static Protected Member Functions inherited from EEPROMStoredBitSet_DefaultHW
static unsigned bits_per_cell ()
 
static unsigned virtual_cell_count ()
 Defines how many virtual cells we store.
 
static unsigned physical_cell_count ()
 Defines.
 
static void write_cell (unsigned cell_offset, eeprom_t value)
 Writes to the physical storage.
 
static eeprom_t read_cell (unsigned cell_offset)
 Reads from the physical storage.
 

Private Member Functions

uint32_t get_address (unsigned cell_offset)
 

Private Attributes

uint8_t blockStart_
 Number of the first block for our data.
 
uint8_t blockCount_
 Number of the blocks of 16 words each to use for our data.
 

Additional Inherited Members

- Protected Types inherited from EEPROMStoredBitSet_DefaultHW
typedef uint32_t eeprom_t
 

Detailed Description

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
class TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >

Definition at line 48 of file TivaEEPROMBitSet.hxx.

Constructor & Destructor Documentation

◆ TivaEEPROMHwDefs()

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >::TivaEEPROMHwDefs ( uint8_t  block_start,
uint8_t  block_count 
)
inlineprotected

For the Tiva 123 use block_count as multiple of 2, for Tiva 129 use multiple of 8.

Same with block_start.

Definition at line 53 of file TivaEEPROMBitSet.hxx.

Member Function Documentation

◆ bits_per_cell()

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
static constexpr unsigned TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >::bits_per_cell ( )
inlinestaticconstexprprotected
Returns
how many user bits we store per physical cell.

Definition at line 75 of file TivaEEPROMBitSet.hxx.

◆ get_address()

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
uint32_t TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >::get_address ( unsigned  cell_offset)
inlineprivate
Returns
the address for TivaWare of the given physical cell.
Parameters
cell_offsetis the physical cell number.

Definition at line 105 of file TivaEEPROMBitSet.hxx.

◆ physical_cell_count()

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
unsigned TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >::physical_cell_count ( )
inlineprotected

Definition at line 85 of file TivaEEPROMBitSet.hxx.

◆ read_cell()

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
eeprom_t TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >::read_cell ( unsigned  cell_offset)
inlineprotected

Definition at line 95 of file TivaEEPROMBitSet.hxx.

◆ virtual_cell_count()

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
static constexpr unsigned TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >::virtual_cell_count ( )
inlinestaticconstexprprotected

Definition at line 80 of file TivaEEPROMBitSet.hxx.

◆ write_cell()

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
void TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >::write_cell ( unsigned  cell_offset,
eeprom_t  value 
)
inlineprotected

Definition at line 90 of file TivaEEPROMBitSet.hxx.

Member Data Documentation

◆ blockCount_

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
uint8_t TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >::blockCount_
private

Number of the blocks of 16 words each to use for our data.

Definition at line 116 of file TivaEEPROMBitSet.hxx.

◆ blockStart_

template<unsigned USER_BIT_COUNT, unsigned BITS_PER_CELL = 27>
uint8_t TivaEEPROMHwDefs< USER_BIT_COUNT, BITS_PER_CELL >::blockStart_
private

Number of the first block for our data.

Definition at line 114 of file TivaEEPROMBitSet.hxx.


The documentation for this class was generated from the following file: