PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)
Diff: POKITTO_HW/PokittoEEPROM.h
- Revision:
- 58:5f58a2846a20
- Parent:
- 36:771321e70814
--- a/POKITTO_HW/PokittoEEPROM.h Tue Oct 02 20:38:50 2018 +0000 +++ b/POKITTO_HW/PokittoEEPROM.h Sun Oct 07 10:06:28 2018 +0000 @@ -38,11 +38,11 @@ : index( index ) {} //Access/read members. - uint8_t operator*() const { return eeprom_read_byte( (uint16_t*) index ); } - operator const uint8_t() const { return **this; } + uint8_t operator*() { return eeprom_read_byte( (uint16_t*) index ); } + operator uint8_t() { return **this; } //Assignment/write members. - EERef &operator=( const EERef &ref ) { return *this = *ref; } + EERef &operator=( EERef &ref ) { return *this = *ref; } EERef &operator=( uint8_t in ) { return eeprom_write_byte( (uint16_t*) index, in ), *this; } EERef &operator +=( uint8_t in ) { return *this = **this + in; } EERef &operator -=( uint8_t in ) { return *this = **this - in; } @@ -88,7 +88,7 @@ EEPtr( const int index ) : index( index ) {} - operator const int() const { return index; } + operator int() { return index; } EEPtr &operator=( int in ) { return index = in, *this; } //Iterator functionality.