File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ typedef unsigned char byte;
19
19
#define HOMEKIT_LOG_DEBUG 3
20
20
21
21
#ifndef HOMEKIT_LOG_LEVEL
22
- #define HOMEKIT_LOG_LEVEL HOMEKIT_LOG_DEBUG
22
+ #define HOMEKIT_LOG_LEVEL HOMEKIT_NO_LOG
23
23
#endif
24
24
25
25
#define HOMEKIT_PRINTF XPGM_PRINTF
Original file line number Diff line number Diff line change @@ -102,7 +102,10 @@ bool homekit_storage_magic_valid() {
102
102
}
103
103
104
104
bool homekit_storage_set_magic () {
105
- if (!spiflash_write (MAGIC_ADDR , (byte * )hap_magic , sizeof (hap_magic ))) {
105
+ char magic [sizeof (hap_magic )];
106
+ memcpy (magic , hap_magic , sizeof (magic ));
107
+
108
+ if (!spiflash_write (MAGIC_ADDR , (byte * )magic , sizeof (magic ))) {
106
109
ERROR ("Failed to write HomeKit storage magic" );
107
110
return false;
108
111
}
You can’t perform that action at this time.
0 commit comments