2 #if !defined TARGET_NATIVE
8 /// General Features ///
9 #define LED_MAX_BRIGHTNESS 50 //0..255 for max led brightness
11 /////////////////////////
13 #define WORD_ALIGNED_ATTR __attribute__((aligned(4)))
16 #define ICACHE_RAM_ATTR //nothing//
18 #undef ICACHE_RAM_ATTR //fix to allow both esp32 and esp8266 to use ICACHE_RAM_ATTR for mapping to IRAM
19 #define ICACHE_RAM_ATTR IRAM_ATTR
22 #if defined(TARGET_NATIVE)
27 #if defined(PLATFORM_STM32)
28 #ifdef GPIO_PIN_LED_WS2812
29 #ifndef GPIO_PIN_LED_WS2812_FAST
30 #error "WS2812 support requires _FAST pin!"
33 #define GPIO_PIN_LED_WS2812 UNDEF_PIN
34 #define GPIO_PIN_LED_WS2812_FAST UNDEF_PIN
38 /* Set red led to default */
40 #ifdef GPIO_PIN_LED_RED
41 #define GPIO_PIN_LED GPIO_PIN_LED_RED
42 #endif /* GPIO_PIN_LED_RED */
43 #endif /* GPIO_PIN_LED */
45 #ifndef GPIO_PIN_BUFFER_OE
46 #define GPIO_PIN_BUFFER_OE UNDEF_PIN
49 #define GPIO_PIN_RST UNDEF_PIN
52 #define GPIO_PIN_BUSY UNDEF_PIN
55 #define GPIO_PIN_DIO0 UNDEF_PIN
58 #define GPIO_PIN_DIO1 UNDEF_PIN
61 #define GPIO_PIN_DIO2 UNDEF_PIN
63 #ifndef GPIO_PIN_PA_ENABLE
64 #define GPIO_PIN_PA_ENABLE UNDEF_PIN
66 #ifndef GPIO_BUTTON_INVERTED
67 #define GPIO_BUTTON_INVERTED 0
69 #ifndef GPIO_LED_RED_INVERTED
70 #define GPIO_LED_RED_INVERTED 0
72 #ifndef GPIO_LED_GREEN_INVERTED
73 #define GPIO_LED_GREEN_INVERTED 0
76 #if defined(Regulatory_Domain_ISM_2400)
77 // ISM 2400 band is use => undefine other requlatory domain defines
78 #undef Regulatory_Domain_AU_915
79 #undef Regulatory_Domain_EU_868
80 #undef Regulatory_Domain_IN_866
81 #undef Regulatory_Domain_FCC_915
82 #undef Regulatory_Domain_AU_433
83 #undef Regulatory_Domain_EU_433
85 #elif !(defined(Regulatory_Domain_AU_915) || defined(Regulatory_Domain_FCC_915) || \
86 defined(Regulatory_Domain_EU_868) || defined(Regulatory_Domain_IN_866) || \
87 defined(Regulatory_Domain_AU_433) || defined(Regulatory_Domain_EU_433) || \
89 #error "Regulatory_Domain is not defined for 900MHz devices. Check user_defines.txt!"