We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f22abab commit d803adfCopy full SHA for d803adf
2 files changed
src/homekit_debug.h
@@ -19,7 +19,7 @@ typedef unsigned char byte;
19
#define HOMEKIT_LOG_DEBUG 3
20
21
#ifndef HOMEKIT_LOG_LEVEL
22
-#define HOMEKIT_LOG_LEVEL HOMEKIT_LOG_DEBUG
+#define HOMEKIT_LOG_LEVEL HOMEKIT_NO_LOG
23
#endif
24
25
#define HOMEKIT_PRINTF XPGM_PRINTF
src/storage.c
@@ -102,7 +102,10 @@ bool homekit_storage_magic_valid() {
102
}
103
104
bool homekit_storage_set_magic() {
105
- if (!spiflash_write(MAGIC_ADDR, (byte *)hap_magic, sizeof(hap_magic))) {
+ char magic[sizeof(hap_magic)];
106
+ memcpy(magic, hap_magic, sizeof(magic));
107
+
108
+ if (!spiflash_write(MAGIC_ADDR, (byte *)magic, sizeof(magic))) {
109
ERROR("Failed to write HomeKit storage magic");
110
return false;
111
0 commit comments