mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-23 11:16:45 +00:00
Xplatfotm changes
This commit is contained in:
parent
19a1ce5eb0
commit
874456b458
@ -1,7 +1,14 @@
|
||||
/* MIT License - Copyright (c) 2020 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "hasp_conf.h" // load first
|
||||
|
||||
#if HASP_USE_EEPROM > 0
|
||||
|
||||
#ifdef ARDUINO
|
||||
#include "Arduino.h"
|
||||
#endif
|
||||
|
||||
#include "EEPROM.h"
|
||||
|
||||
void eepromSetup()
|
||||
@ -9,7 +16,8 @@ void eepromSetup()
|
||||
|
||||
#if defined(STM32Fxx)
|
||||
eeprom_buffer_fill();
|
||||
char buffer[] = "{\"objid\":10,\"id\":1,\"page\":0,\"x\":10,\"y\":45,\"w\":220,\"h\":55,\"toggle\":\"TRUE\",\"txt\":\"Toggle Me\"}";
|
||||
char buffer[] = "{\"objid\":10,\"id\":1,\"page\":0,\"x\":10,\"y\":45,\"w\":220,\"h\":55,\"toggle\":\"TRUE\","
|
||||
"\"txt\":\"Toggle Me\"}";
|
||||
uint size = strlen(buffer);
|
||||
uint16_t i;
|
||||
for(i = 0; i < size; i++) eeprom_buffered_write_byte(i + 4096, buffer[i]);
|
||||
@ -24,3 +32,5 @@ void eepromSetup()
|
||||
|
||||
void eepromLoop()
|
||||
{}
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user