Browse Source

system: same name as light for rtcmem struct member

master
Maxim Prokhorov 5 years ago
parent
commit
5e0ec8613b
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      code/espurna/system.ino

+ 5
- 5
code/espurna/system.ino View File

@ -27,33 +27,33 @@ union system_rtcmem_t {
uint8_t stability_counter;
uint8_t reset_reason;
uint16_t _reserved_;
} parts;
} packed;
uint32_t value;
};
uint8_t systemStabilityCounter() {
system_rtcmem_t data;
data.value = Rtcmem->sys;
return data.parts.stability_counter;
return data.packed.stability_counter;
}
void systemStabilityCounter(uint8_t count) {
system_rtcmem_t data;
data.value = Rtcmem->sys;
data.parts.stability_counter = count;
data.packed.stability_counter = count;
Rtcmem->sys = data.value;
}
uint8_t _systemResetReason() {
system_rtcmem_t data;
data.value = Rtcmem->sys;
return data.parts.reset_reason;
return data.packed.reset_reason;
}
void _systemResetReason(uint8_t reason) {
system_rtcmem_t data;
data.value = Rtcmem->sys;
data.parts.reset_reason = reason;
data.packed.reset_reason = reason;
Rtcmem->sys = data.value;
}


Loading…
Cancel
Save