Skip to content

Commit

Permalink
make compile standalone on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 23, 2023
1 parent 3ab5946 commit ba4ebe2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 37 deletions.
3 changes: 1 addition & 2 deletions lib_standalone/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@

#include <iostream>

// #define IPAddress std::string
// #define IPAddress String
typedef double double_t;

#define ICACHE_FLASH_ATTR
#define ICACHE_RAM_ATTR
Expand Down
70 changes: 35 additions & 35 deletions lib_standalone/Preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,53 +30,53 @@ class Preferences {
return 0;
}

size_t putDouble(const char * key, double_t value) {
size_t putDouble(const char * key, double value) {
return 0;
}

uint8_t getUChar(const char * key, uint8_t defaultValue = 0) {
return 0;
}

double_t getDouble(const char * key, double_t defaultValue = NAN) {
double getDouble(const char * key, double defaultValue = NAN) {
return NAN;
}

// unused

void end();
bool clear();
size_t putShort(const char * key, int16_t value);
size_t putUShort(const char * key, uint16_t value);
size_t putInt(const char * key, int32_t value);
size_t putUInt(const char * key, uint32_t value);
size_t putLong(const char * key, int32_t value);
size_t putULong(const char * key, uint32_t value);
size_t putLong64(const char * key, int64_t value);
size_t putULong64(const char * key, uint64_t value);
size_t putFloat(const char * key, float_t value);
size_t putBool(const char * key, bool value);
size_t putString(const char * key, const char * value);
size_t putString(const char * key, String value);
size_t putBytes(const char * key, const void * value, size_t len);
bool isKey(const char * key);
PreferenceType getType(const char * key);
int8_t getChar(const char * key, int8_t defaultValue = 0);
int16_t getShort(const char * key, int16_t defaultValue = 0);
uint16_t getUShort(const char * key, uint16_t defaultValue = 0);
int32_t getInt(const char * key, int32_t defaultValue = 0);
uint32_t getUInt(const char * key, uint32_t defaultValue = 0);
int32_t getLong(const char * key, int32_t defaultValue = 0);
uint32_t getULong(const char * key, uint32_t defaultValue = 0);
int64_t getLong64(const char * key, int64_t defaultValue = 0);
uint64_t getULong64(const char * key, uint64_t defaultValue = 0);
float_t getFloat(const char * key, float_t defaultValue = NAN);
bool getBool(const char * key, bool defaultValue = false);
size_t getString(const char * key, char * value, size_t maxLen);
String getString(const char * key, String defaultValue = String());
size_t getBytesLength(const char * key);
size_t getBytes(const char * key, void * buf, size_t maxLen);
size_t freeEntries();
// void end();
// bool clear();
// size_t putShort(const char * key, int16_t value);
// size_t putUShort(const char * key, uint16_t value);
// size_t putInt(const char * key, int32_t value);
// size_t putUInt(const char * key, uint32_t value);
// size_t putLong(const char * key, int32_t value);
// size_t putULong(const char * key, uint32_t value);
// size_t putLong64(const char * key, int64_t value);
// size_t putULong64(const char * key, uint64_t value);
// size_t putFloat(const char * key, float_t value);
// size_t putBool(const char * key, bool value);
// size_t putString(const char * key, const char * value);
// size_t putString(const char * key, String value);
// size_t putBytes(const char * key, const void * value, size_t len);
// bool isKey(const char * key);
// PreferenceType getType(const char * key);
// int8_t getChar(const char * key, int8_t defaultValue = 0);
// int16_t getShort(const char * key, int16_t defaultValue = 0);
// uint16_t getUShort(const char * key, uint16_t defaultValue = 0);
// int32_t getInt(const char * key, int32_t defaultValue = 0);
// uint32_t getUInt(const char * key, uint32_t defaultValue = 0);
// int32_t getLong(const char * key, int32_t defaultValue = 0);
// uint32_t getULong(const char * key, uint32_t defaultValue = 0);
// int64_t getLong64(const char * key, int64_t defaultValue = 0);
// uint64_t getULong64(const char * key, uint64_t defaultValue = 0);
// float_t getFloat(const char * key, float_t defaultValue = NAN);
// bool getBool(const char * key, bool defaultValue = false);
// size_t getString(const char * key, char * value, size_t maxLen);
// String getString(const char * key, String defaultValue = String());
// size_t getBytesLength(const char * key);
// size_t getBytes(const char * key, void * buf, size_t maxLen);
// size_t freeEntries();
};

#endif

0 comments on commit ba4ebe2

Please sign in to comment.