Skip to content

Commit b6a7613

Browse files
authored
Merge pull request #7470 from microdev1/espnow
Add ESP-NOW Support
2 parents 3c92f59 + 58f28b9 commit b6a7613

27 files changed

+1535
-136
lines changed

locale/circuitpython.pot

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ msgstr ""
144144
msgid "%q init failed"
145145
msgstr ""
146146

147-
#: shared-bindings/dualbank/__init__.c
147+
#: ports/espressif/bindings/espnow/Peer.c shared-bindings/dualbank/__init__.c
148148
msgid "%q is %q"
149149
msgstr ""
150150

@@ -242,7 +242,7 @@ msgstr ""
242242
msgid "%q=%q"
243243
msgstr ""
244244

245-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
245+
#: ports/espressif/common-hal/espidf/__init__.c
246246
#, c-format
247247
msgid "%s error 0x%x"
248248
msgstr ""
@@ -510,6 +510,7 @@ msgstr ""
510510
msgid "Already have all-matches listener"
511511
msgstr ""
512512

513+
#: ports/espressif/bindings/espnow/ESPNow.c
513514
#: ports/espressif/common-hal/espulp/ULP.c
514515
#: shared-module/memorymonitor/AllocationAlarm.c
515516
#: shared-module/memorymonitor/AllocationSize.c
@@ -681,7 +682,7 @@ msgstr ""
681682
msgid "CIRCUITPY drive could not be found or created."
682683
msgstr ""
683684

684-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
685+
#: ports/espressif/common-hal/espidf/__init__.c
685686
msgid "CRC or checksum was invalid"
686687
msgstr ""
687688

@@ -1072,7 +1073,7 @@ msgstr ""
10721073
msgid "GNSS init"
10731074
msgstr ""
10741075

1075-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1076+
#: ports/espressif/common-hal/espidf/__init__.c
10761077
msgid "Generic Failure"
10771078
msgstr ""
10781079

@@ -1255,8 +1256,7 @@ msgstr ""
12551256
msgid "Invalid MAC address"
12561257
msgstr ""
12571258

1258-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1259-
#: py/moduerrno.c
1259+
#: ports/espressif/common-hal/espidf/__init__.c py/moduerrno.c
12601260
msgid "Invalid argument"
12611261
msgstr ""
12621262

@@ -1282,7 +1282,7 @@ msgstr ""
12821282
msgid "Invalid multicast MAC address"
12831283
msgstr ""
12841284

1285-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1285+
#: ports/espressif/common-hal/espidf/__init__.c
12861286
msgid "Invalid size"
12871287
msgstr ""
12881288

@@ -1291,7 +1291,7 @@ msgstr ""
12911291
msgid "Invalid socket for TLS"
12921292
msgstr ""
12931293

1294-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1294+
#: ports/espressif/common-hal/espidf/__init__.c
12951295
msgid "Invalid state"
12961296
msgstr ""
12971297

@@ -1323,7 +1323,7 @@ msgstr ""
13231323
msgid "Layer must be a Group or TileGrid subclass"
13241324
msgstr ""
13251325

1326-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1326+
#: ports/espressif/common-hal/espidf/__init__.c
13271327
msgid "MAC address was invalid"
13281328
msgstr ""
13291329

@@ -1679,19 +1679,19 @@ msgstr ""
16791679
msgid "Operation not permitted"
16801680
msgstr ""
16811681

1682-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1682+
#: ports/espressif/common-hal/espidf/__init__.c
16831683
msgid "Operation or feature not supported"
16841684
msgstr ""
16851685

1686-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1686+
#: ports/espressif/common-hal/espidf/__init__.c
16871687
msgid "Operation timed out"
16881688
msgstr ""
16891689

16901690
#: ports/raspberrypi/common-hal/mdns/Server.c
16911691
msgid "Out of MDNS service slots"
16921692
msgstr ""
16931693

1694-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1694+
#: ports/espressif/common-hal/espidf/__init__.c
16951695
msgid "Out of memory"
16961696
msgstr ""
16971697

@@ -1867,7 +1867,7 @@ msgstr ""
18671867
msgid "Read-only filesystem"
18681868
msgstr ""
18691869

1870-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1870+
#: ports/espressif/common-hal/espidf/__init__.c
18711871
msgid "Received response was invalid"
18721872
msgstr ""
18731873

@@ -1887,7 +1887,7 @@ msgstr ""
18871887
msgid "Requested AES mode is unsupported"
18881888
msgstr ""
18891889

1890-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
1890+
#: ports/espressif/common-hal/espidf/__init__.c
18911891
msgid "Requested resource not found"
18921892
msgstr ""
18931893

@@ -2338,7 +2338,7 @@ msgstr ""
23382338
msgid "Value length > max_length"
23392339
msgstr ""
23402340

2341-
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
2341+
#: ports/espressif/common-hal/espidf/__init__.c
23422342
msgid "Version was invalid"
23432343
msgstr ""
23442344

ports/espressif/Makefile

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,13 @@ ifeq ($(DEBUG), 1)
126126
# CFLAGS += -fno-inline -fno-ipa-sra
127127
else
128128
CFLAGS += -DNDEBUG -ggdb3
129-
OPTIMIZATION_FLAGS ?= -O2
130129
# RISC-V is larger than xtensa
131130
# Use -Os for RISC-V when it overflows
131+
ifeq ($(IDF_TARGET_ARCH),riscv)
132+
OPTIMIZATION_FLAGS ?= -Os
133+
else
134+
OPTIMIZATION_FLAGS ?= -O2
135+
endif
132136
endif
133137

134138
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
@@ -214,7 +218,6 @@ endif
214218
SRC_C += \
215219
background.c \
216220
mphalport.c \
217-
bindings/espidf/__init__.c \
218221
boards/$(BOARD)/board.c \
219222
boards/$(BOARD)/pins.c \
220223
shared/netutils/netutils.c \
@@ -248,8 +251,6 @@ ifneq ($(CIRCUITPY_BLEIO),0)
248251
SRC_C += common-hal/_bleio/ble_events.c
249252
endif
250253

251-
SRC_C += $(wildcard common-hal/espidf/*.c)
252-
253254
ifneq ($(CIRCUITPY_ESPCAMERA),0)
254255
SRC_CAMERA := \
255256
$(wildcard common-hal/espcamera/*.c) \
@@ -259,6 +260,20 @@ CFLAGS += -isystem esp32-camera/driver/include
259260
CFLAGS += -isystem esp32-camera/conversions/include
260261
endif
261262

263+
ifneq ($(CIRCUITPY_ESPIDF),0)
264+
SRC_ESPIDF := \
265+
$(wildcard common-hal/espidf/*.c) \
266+
$(wildcard bindings/espidf/*.c)
267+
SRC_C += $(SRC_ESPIDF)
268+
endif
269+
270+
ifneq ($(CIRCUITPY_ESPNOW),0)
271+
SRC_ESPNOW := \
272+
$(wildcard common-hal/espnow/*.c) \
273+
$(wildcard bindings/espnow/*.c)
274+
SRC_C += $(SRC_ESPNOW)
275+
endif
276+
262277
ifneq ($(CIRCUITPY_ESPULP),0)
263278
SRC_ULP := \
264279
$(wildcard common-hal/espulp/*.c) \

0 commit comments

Comments
 (0)