esp32,esp8266: Rename MICROPY_ESPNOW to MICROPY_PY_ESPNOW.
For consistency with other Python-level modules. Also add the corresponding missing preprocessor guard to esp32/modespnow.c, so that this port compiles if MICROPY_PY_ESPNOW and MICROPY_PY_NETWORK_WLAN are set to 0. Fixes #12622. Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
This commit is contained in:
committed by
Damien George
parent
a06f4c8df4
commit
9f835df35e
@@ -78,8 +78,8 @@ LD_FILES ?= boards/esp8266_2m.ld
|
||||
LDFLAGS += -nostdlib -T $(LD_FILES) -Map=$(@:.elf=.map) --cref
|
||||
LIBS += -L$(ESP_SDK)/lib -lmain -ljson -llwip_open -lpp -lnet80211 -lwpa -lphy -lnet80211
|
||||
|
||||
ifeq ($(MICROPY_ESPNOW),1)
|
||||
CFLAGS += -DMICROPY_ESPNOW=1
|
||||
ifeq ($(MICROPY_PY_ESPNOW),1)
|
||||
CFLAGS += -DMICROPY_PY_ESPNOW=1
|
||||
LIBS += -lespnow
|
||||
endif
|
||||
|
||||
@@ -126,7 +126,7 @@ SRC_C = \
|
||||
hspi.c \
|
||||
$(wildcard $(BOARD_DIR)/*.c) \
|
||||
|
||||
ifeq ($(MICROPY_ESPNOW),1)
|
||||
ifeq ($(MICROPY_PY_ESPNOW),1)
|
||||
SRC_C += \
|
||||
modespnow.c
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
ifeq ($(BOARD_VARIANT),)
|
||||
LD_FILES = boards/esp8266_2MiB.ld
|
||||
|
||||
MICROPY_ESPNOW ?= 1
|
||||
MICROPY_PY_ESPNOW ?= 1
|
||||
MICROPY_PY_BTREE ?= 1
|
||||
MICROPY_VFS_FAT ?= 1
|
||||
MICROPY_VFS_LFS2 ?= 1
|
||||
@@ -16,7 +16,7 @@ endif
|
||||
ifeq ($(BOARD_VARIANT),FLASH_1M)
|
||||
LD_FILES = boards/esp8266_1MiB.ld
|
||||
|
||||
MICROPY_ESPNOW ?= 1
|
||||
MICROPY_PY_ESPNOW ?= 1
|
||||
MICROPY_PY_BTREE ?= 1
|
||||
MICROPY_VFS_LFS2 ?= 1
|
||||
|
||||
@@ -29,7 +29,7 @@ endif
|
||||
ifeq ($(BOARD_VARIANT),OTA)
|
||||
LD_FILES = boards/esp8266_ota.ld
|
||||
|
||||
MICROPY_ESPNOW ?= 1
|
||||
MICROPY_PY_ESPNOW ?= 1
|
||||
MICROPY_PY_BTREE ?= 1
|
||||
MICROPY_VFS_LFS2 ?= 1
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "gccollect.h"
|
||||
#include "user_interface.h"
|
||||
|
||||
#if MICROPY_ESPNOW
|
||||
#if MICROPY_PY_ESPNOW
|
||||
#include "modespnow.h"
|
||||
#endif
|
||||
|
||||
@@ -77,7 +77,7 @@ STATIC void mp_reset(void) {
|
||||
mp_os_dupterm_obj.fun.var(2, args);
|
||||
}
|
||||
|
||||
#if MICROPY_ESPNOW
|
||||
#if MICROPY_PY_ESPNOW
|
||||
espnow_deinit(mp_const_none);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "py/runtime.h"
|
||||
|
||||
#if MICROPY_ESPNOW
|
||||
#if MICROPY_PY_ESPNOW
|
||||
|
||||
#include "c_types.h"
|
||||
#include "espnow.h"
|
||||
|
||||
Reference in New Issue
Block a user