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 /* ICACHE_RAM_ATTR1 is always linked into RAM */
17 #define ICACHE_RAM_ATTR1 __section(".ram_code")
18 /* ICACHE_RAM_ATTR2 is linked into RAM only if enough space */
20 #define ICACHE_RAM_ATTR2
22 #define ICACHE_RAM_ATTR2 __section(".ram_code")
24 #define ICACHE_RAM_ATTR //nothing//
26 #undef ICACHE_RAM_ATTR //fix to allow both esp32 and esp8266 to use ICACHE_RAM_ATTR for mapping to IRAM
27 #define ICACHE_RAM_ATTR IRAM_ATTR
30 #if defined(TARGET_NATIVE)
35 #if defined(PLATFORM_STM32)
36 #ifdef GPIO_PIN_LED_WS2812
37 #ifndef GPIO_PIN_LED_WS2812_FAST
38 #error "WS2812 support requires _FAST pin!"
41 #define GPIO_PIN_LED_WS2812 UNDEF_PIN
42 #define GPIO_PIN_LED_WS2812_FAST UNDEF_PIN
46 /* Set red led to default */
48 #ifdef GPIO_PIN_LED_RED
49 #define GPIO_PIN_LED GPIO_PIN_LED_RED
50 #endif /* GPIO_PIN_LED_RED */
51 #endif /* GPIO_PIN_LED */
53 #ifndef GPIO_PIN_BUFFER_OE
54 #define GPIO_PIN_BUFFER_OE UNDEF_PIN
57 #define GPIO_PIN_RST UNDEF_PIN
60 #define GPIO_PIN_BUSY UNDEF_PIN
63 #define GPIO_PIN_DIO0 UNDEF_PIN
66 #define GPIO_PIN_DIO1 UNDEF_PIN
69 #define GPIO_PIN_DIO2 UNDEF_PIN
71 #ifndef GPIO_PIN_PA_ENABLE
72 #define GPIO_PIN_PA_ENABLE UNDEF_PIN
74 #ifndef GPIO_BUTTON_INVERTED
75 #define GPIO_BUTTON_INVERTED 0
77 #ifndef GPIO_LED_RED_INVERTED
78 #define GPIO_LED_RED_INVERTED 0
80 #ifndef GPIO_LED_GREEN_INVERTED
81 #define GPIO_LED_GREEN_INVERTED 0
83 #ifndef GPIO_LED_BLUE_INVERTED
84 #define GPIO_LED_BLUE_INVERTED 0
87 #if !defined(BACKPACK_LOGGING_BAUD)
88 #define BACKPACK_LOGGING_BAUD 460800
91 #if defined(Regulatory_Domain_ISM_2400)
92 // ISM 2400 band is use => undefine other requlatory domain defines
93 #undef Regulatory_Domain_AU_915
94 #undef Regulatory_Domain_EU_868
95 #undef Regulatory_Domain_IN_866
96 #undef Regulatory_Domain_FCC_915
97 #undef Regulatory_Domain_AU_433
98 #undef Regulatory_Domain_EU_433
100 #elif !(defined(Regulatory_Domain_AU_915) || defined(Regulatory_Domain_FCC_915) || \
101 defined(Regulatory_Domain_EU_868) || defined(Regulatory_Domain_IN_866) || \
102 defined(Regulatory_Domain_AU_433) || defined(Regulatory_Domain_EU_433) || \
104 #error "Regulatory_Domain is not defined for 900MHz devices. Check user_defines.txt!"