38 EERef(
const int index )
42 uint8_t operator*()
const {
return eeprom_read_byte( (uint8_t*) index ); }
43 operator uint8_t()
const {
return **
this; }
46 EERef &operator=(
const EERef &ref ) {
return *
this = *ref; }
47 EERef &operator=( uint8_t in ) {
return eeprom_write_byte( (uint8_t*) index, in ), *
this; }
48 EERef &operator +=( uint8_t in ) {
return *
this = **
this + in; }
49 EERef &operator -=( uint8_t in ) {
return *
this = **
this - in; }
50 EERef &operator *=( uint8_t in ) {
return *
this = **
this * in; }
51 EERef &operator /=( uint8_t in ) {
return *
this = **
this / in; }
52 EERef &operator ^=( uint8_t in ) {
return *
this = **
this ^ in; }
53 EERef &operator %=( uint8_t in ) {
return *
this = **
this % in; }
54 EERef &operator &=( uint8_t in ) {
return *
this = **
this & in; }
55 EERef &operator |=( uint8_t in ) {
return *
this = **
this | in; }
56 EERef &operator <<=( uint8_t in ) {
return *
this = **
this << in; }
57 EERef &operator >>=( uint8_t in ) {
return *
this = **
this >> in; }
59 EERef &update( uint8_t in ) {
return in != *
this ? *
this = in : *
this; }
63 EERef& operator--() {
return *
this -= 1; }
68 return ++(*this), ret;
71 uint8_t operator-- (
int){
73 return --(*this), ret;