|
STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
|
← STM32duino documentation
|
#include <EEPROM.h>
Public Member Functions | |
| EERef (const int idx) | |
| Construct a reference to an EEPROM cell. | |
| uint8_t | operator* () const |
| Read the value of the referenced EEPROM cell. | |
| operator uint8_t () const | |
| Implicit conversion to uint8_t, reads the referenced EEPROM cell. | |
| EERef & | operator= (const EERef &ref) |
| Write the value of another EERef to the referenced EEPROM cell. | |
| EERef & | operator= (uint8_t in) |
| Write a byte to the referenced EEPROM cell. | |
| EERef & | operator+= (uint8_t in) |
| Add a value to the stored value and write the result back. | |
| EERef & | operator-= (uint8_t in) |
| Subtract a value from the stored value and write the result back. | |
| EERef & | operator*= (uint8_t in) |
| Multiply the stored value by a value and write the result back. | |
| EERef & | operator/= (uint8_t in) |
| Divide the stored value by a value and write the result back. | |
| EERef & | operator^= (uint8_t in) |
| Bitwise XOR the stored value with a value and write the result back. | |
| EERef & | operator%= (uint8_t in) |
| Modulo the stored value by a value and write the result back. | |
| EERef & | operator&= (uint8_t in) |
| Bitwise AND the stored value with a value and write the result back. | |
| EERef & | operator|= (uint8_t in) |
| Bitwise OR the stored value with a value and write the result back. | |
| EERef & | operator<<= (uint8_t in) |
| Left shift the stored value by a value and write the result back. | |
| EERef & | operator>>= (uint8_t in) |
| Right shift the stored value by a value and write the result back. | |
| EERef & | update (uint8_t in) |
| Write a value only if it differs from the stored value, to reduce EEPROM wear. | |
| EERef & | operator++ () |
| Prefix increment of the stored value. | |
| EERef & | operator-- () |
| Prefix decrement of the stored value. | |
| uint8_t | operator++ (int) |
| Postfix increment of the stored value. | |
| uint8_t | operator-- (int) |
| Postfix decrement of the stored value. | |
Public Attributes | |
| int | index |
| Index of the EEPROM cell this reference points to. | |
EERef class.
This object references an EEPROM cell. Its purpose is to mimic a typical byte of RAM, however its storage is the EEPROM. This class has an overhead of two bytes, similar to storing a pointer to an EEPROM cell.
|
inline |
Construct a reference to an EEPROM cell.
| idx | Index of the EEPROM cell. |
|
inline |
Implicit conversion to uint8_t, reads the referenced EEPROM cell.
|
inline |
Modulo the stored value by a value and write the result back.
| in | Operand. |
|
inline |
Bitwise AND the stored value with a value and write the result back.
| in | Operand. |
|
inline |
Read the value of the referenced EEPROM cell.
|
inline |
Multiply the stored value by a value and write the result back.
| in | Operand. |
|
inline |
Prefix increment of the stored value.
|
inline |
Postfix increment of the stored value.
|
inline |
Add a value to the stored value and write the result back.
| in | Operand. |
|
inline |
Prefix decrement of the stored value.
|
inline |
Postfix decrement of the stored value.
|
inline |
Subtract a value from the stored value and write the result back.
| in | Operand. |
|
inline |
Divide the stored value by a value and write the result back.
| in | Operand. |
|
inline |
Left shift the stored value by a value and write the result back.
| in | Number of bits to shift. |
Write the value of another EERef to the referenced EEPROM cell.
| ref | Reference whose value is written. |
|
inline |
Write a byte to the referenced EEPROM cell.
| in | Value to write. |
|
inline |
Right shift the stored value by a value and write the result back.
| in | Number of bits to shift. |
|
inline |
Bitwise XOR the stored value with a value and write the result back.
| in | Operand. |
|
inline |
Bitwise OR the stored value with a value and write the result back.
| in | Operand. |
|
inline |
Write a value only if it differs from the stored value, to reduce EEPROM wear.
| in | Value to write. |