allow the examples to build in a more strict env (#3299)

This commit is contained in:
Me No Dev
2019-09-29 23:47:02 +03:00
committed by GitHub
parent 5bff89f0be
commit 1c77790a5b
15 changed files with 31 additions and 36 deletions

View File

@ -37,7 +37,8 @@ void setup() {
ESP.restart();
}
char* name = "Teo Swee Ann";
const char* name = "Teo Swee Ann";
char rname[32];
double height = 5.8;
uint32_t age = 47;
@ -60,10 +61,10 @@ void setup() {
Serial.println("------------------------------------\n");
// Read: Variables <--- EEPROM stores
NAMES.get(0, name);
NAMES.get(0, rname);
HEIGHT.get(0, height);
AGE.get(0, age);
Serial.print("name: "); Serial.println(name);
Serial.print("name: "); Serial.println(rname);
Serial.print("height: "); Serial.println(height);
Serial.print("age: "); Serial.println(age);

View File

@ -49,11 +49,11 @@ void setup() {
EEPROM.writeULong(address, 4294967295); // Same as writeUInt and readUInt
address += sizeof(unsigned long);
int64_t value = -9223372036854775808; // -2^63
int64_t value = -1223372036854775808LL; // -2^63
EEPROM.writeLong64(address, value);
address += sizeof(int64_t);
uint64_t Value = 18446744073709551615; // 2^64 - 1
uint64_t Value = 18446744073709551615ULL; // 2^64 - 1
EEPROM.writeULong64(address, Value);
address += sizeof(uint64_t);