Plant Watering Sensor
|
This module contains access to the permanent settings of the device. More...
Classes | |
struct | Data |
The internal structure of the data. More... | |
Functions | |
uint16_t | calculateCrc () |
Calculate the CRC of the current SRAM data. More... | |
void | read () |
Read all settings into SRAM. More... | |
void | write () |
Write all settings back to EEPROM. More... | |
uint8_t | getSetPointFrequency () |
Read the set-point value. More... | |
void | setSetPointFrequency (uint8_t frequency) |
Write a new set-point value. More... | |
Variables | |
const uint16_t | cCrcStartMagic = 0xa004u |
The CRC start magic. More... | |
const uint8_t | cMagicSize = 4 |
The size of the magic. More... | |
EEMEM Data | eData |
Allocate the data in the EEPROM memory. More... | |
Data | gData |
Allocate the data in SRAM. More... | |
PROGMEM const Data | cDefaultData |
Allocate default data in Flash memory. More... | |
This module contains access to the permanent settings of the device.
uint16_t Settings::calculateCrc | ( | ) |
Calculate the CRC of the current SRAM data.
The CRC is calculated using the cCrcStartMagic as start point over the whole data structure with the CRC in the structure set to zero.
Definition at line 73 of file Settings.cpp.
uint8_t Settings::getSetPointFrequency | ( | ) |
Read the set-point value.
Definition at line 112 of file Settings.cpp.
void Settings::read | ( | ) |
Read all settings into SRAM.
Definition at line 85 of file Settings.cpp.
void Settings::setSetPointFrequency | ( | uint8_t | frequency | ) |
Write a new set-point value.
frequency | The new oscillator frequency. |
Definition at line 118 of file Settings.cpp.
void Settings::write | ( | ) |
Write all settings back to EEPROM.
Definition at line 103 of file Settings.cpp.
const uint16_t Settings::cCrcStartMagic = 0xa004u |
The CRC start magic.
Definition at line 37 of file Settings.cpp.
PROGMEM const Data Settings::cDefaultData |
Allocate default data in Flash memory.
Definition at line 61 of file Settings.cpp.
const uint8_t Settings::cMagicSize = 4 |
The size of the magic.
Definition at line 41 of file Settings.cpp.
EEMEM Data Settings::eData |
Allocate the data in the EEPROM memory.
Definition at line 53 of file Settings.cpp.
Data Settings::gData |
Allocate the data in SRAM.
Definition at line 57 of file Settings.cpp.