From 5e0ec8613b056bdab1b94b7ac07b99a52a1365b3 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Fri, 29 Nov 2019 01:05:14 +0300 Subject: [PATCH] system: same name as light for rtcmem struct member --- code/espurna/system.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/espurna/system.ino b/code/espurna/system.ino index 20e88621..a2eafd01 100644 --- a/code/espurna/system.ino +++ b/code/espurna/system.ino @@ -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; }