minor platform macro changes
worked on code for LoRa SX1276
This commit is contained in:
24
Platforms.h
24
Platforms.h
@@ -7,20 +7,32 @@
|
||||
// https://blog.anto.io/wp-content/uploads/2016/12/esp32.png
|
||||
// https://i.pinimg.com/originals/c6/57/83/c657835e84aaf91832a770ea0d7d0767.jpg
|
||||
#define WROOM32_DEVKIT 32
|
||||
#define TTGO 33
|
||||
|
||||
|
||||
#define ESP8266 (PLATFORM == WEMOS_D1_MINI) || (PLATFORM == NODE_MCU)
|
||||
#define ESP32 (PLATFORM == WROOM32_DEVKIT)
|
||||
#define ESP32 (PLATFORM == WROOM32_DEVKIT) || (PLATFORM == TTGO)
|
||||
|
||||
|
||||
#if (PLATFORM == WROOM32_DEVKIT)
|
||||
#define DELAY_US(us) ets_delay_us(us)
|
||||
#define IN_FLASH
|
||||
#ifndef PLATFORM
|
||||
#error "PLATFORM compile time variable not defined"
|
||||
#endif
|
||||
|
||||
#if (PLATFORM == WEMOS_D1_MINI) || (PLATFORM == NODE_MCU)
|
||||
#if (ESP32)
|
||||
|
||||
#pragma message "Using ESP32"
|
||||
#define DELAY_US(us) ets_delay_us(us)
|
||||
#define IN_FLASH
|
||||
|
||||
#elif (ESP8266)
|
||||
|
||||
#pragma message "Using ESP8266"
|
||||
#define DELAY_US(us) os_delay_us(us)
|
||||
#define IN_FLASH ICACHE_FLASH_ATTR
|
||||
|
||||
#else
|
||||
|
||||
#error "unsupported platform";
|
||||
|
||||
#endif
|
||||
|
||||
//#define min(a,b) (a<b) ? (a) : (b)
|
||||
|
||||
Reference in New Issue
Block a user