many changes
This commit is contained in:
34
Platforms.h
34
Platforms.h
@@ -5,8 +5,38 @@
|
||||
|
||||
|
||||
// https://blog.anto.io/wp-content/uploads/2016/12/esp32.png
|
||||
#define NODE32S 32
|
||||
// https://i.pinimg.com/originals/c6/57/83/c657835e84aaf91832a770ea0d7d0767.jpg
|
||||
#define WROOM32_DEVKIT 32
|
||||
|
||||
|
||||
#define ESP8266 (PLATFORM == WEMOS_D1_MINI) || (PLATFORM == NODE_MCU)
|
||||
#define ESP32 (PLATFORM == WROOM32_DEVKIT)
|
||||
|
||||
#define PLATFORM NODE32S
|
||||
|
||||
#if (PLATFORM == WROOM32_DEVKIT)
|
||||
#define DELAY_US(us) ets_delay_us(us)
|
||||
#define IN_FLASH
|
||||
#endif
|
||||
|
||||
#if (PLATFORM == WEMOS_D1_MINI) || (PLATFORM == NODE_MCU)
|
||||
#define DELAY_US(us) os_delay_us(us)
|
||||
#define IN_FLASH ICACHE_FLASH_ATTR
|
||||
#endif
|
||||
|
||||
#define min(a,b) (a<b) ? (a) : (b)
|
||||
#define max(a,b) (a>b) ? (a) : (b)
|
||||
|
||||
//template <typename T> inline T min(const T a, const T b) {
|
||||
// return (a<b) ? (a) : (b);
|
||||
//}
|
||||
|
||||
//template <typename T> inline T max(const T a, const T b) {
|
||||
// return (a>b) ? (a) : (b);
|
||||
//}
|
||||
|
||||
#if ESP8266
|
||||
#define sprintf os_sprintf
|
||||
#elif ESP32
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user