Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESP-NOW Support #7470

Merged
merged 18 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ msgstr ""
msgid "%q init failed"
msgstr ""

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

Expand Down Expand Up @@ -222,7 +222,7 @@ msgstr ""
msgid "%q=%q"
msgstr ""

#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
#: ports/espressif/common-hal/espidf/__init__.c
#, c-format
msgid "%s error 0x%x"
msgstr ""
Expand Down Expand Up @@ -491,6 +491,7 @@ msgstr ""
msgid "Already have all-matches listener"
msgstr ""

#: ports/espressif/bindings/espnow/ESPNow.c
#: ports/espressif/common-hal/espulp/ULP.c
#: shared-module/memorymonitor/AllocationAlarm.c
#: shared-module/memorymonitor/AllocationSize.c
Expand Down Expand Up @@ -679,7 +680,7 @@ msgstr ""
msgid "CIRCUITPY drive could not be found or created."
msgstr ""

#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
#: ports/espressif/common-hal/espidf/__init__.c
msgid "CRC or checksum was invalid"
msgstr ""

Expand Down Expand Up @@ -1066,7 +1067,7 @@ msgstr ""
msgid "GNSS init"
msgstr ""

#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
#: ports/espressif/common-hal/espidf/__init__.c
msgid "Generic Failure"
msgstr ""

Expand Down Expand Up @@ -1234,8 +1235,7 @@ msgstr ""
msgid "Invalid MAC address"
msgstr ""

#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
#: py/moduerrno.c
#: ports/espressif/common-hal/espidf/__init__.c py/moduerrno.c
msgid "Invalid argument"
msgstr ""

Expand Down Expand Up @@ -1265,7 +1265,7 @@ msgstr ""
msgid "Invalid multicast MAC address"
msgstr ""

#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
#: ports/espressif/common-hal/espidf/__init__.c
msgid "Invalid size"
msgstr ""

Expand All @@ -1274,7 +1274,7 @@ msgstr ""
msgid "Invalid socket for TLS"
msgstr ""

#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
#: ports/espressif/common-hal/espidf/__init__.c
msgid "Invalid state"
msgstr ""

Expand Down Expand Up @@ -1306,7 +1306,7 @@ msgstr ""
msgid "Layer must be a Group or TileGrid subclass"
msgstr ""

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

Expand Down Expand Up @@ -1666,19 +1666,19 @@ msgstr ""
msgid "Operation not permitted"
msgstr ""

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

#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
#: ports/espressif/common-hal/espidf/__init__.c
msgid "Operation timed out"
msgstr ""

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

#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
#: ports/espressif/common-hal/espidf/__init__.c
msgid "Out of memory"
msgstr ""

Expand Down Expand Up @@ -1854,7 +1854,7 @@ msgstr ""
msgid "Read-only filesystem"
msgstr ""

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

Expand All @@ -1874,7 +1874,7 @@ msgstr ""
msgid "Requested AES mode is unsupported"
msgstr ""

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

Expand Down Expand Up @@ -2340,7 +2340,7 @@ msgstr ""
msgid "Value length > max_length"
msgstr ""

#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
#: ports/espressif/common-hal/espidf/__init__.c
msgid "Version was invalid"
msgstr ""

Expand Down
23 changes: 19 additions & 4 deletions ports/espressif/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,13 @@ ifeq ($(DEBUG), 1)
# CFLAGS += -fno-inline -fno-ipa-sra
else
CFLAGS += -DNDEBUG -ggdb3
OPTIMIZATION_FLAGS ?= -O2
# RISC-V is larger than xtensa
# Use -Os for RISC-V when it overflows
ifeq ($(IDF_TARGET_ARCH),riscv)
OPTIMIZATION_FLAGS ?= -Os
else
OPTIMIZATION_FLAGS ?= -O2
endif
endif

# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
Expand Down Expand Up @@ -214,7 +218,6 @@ endif
SRC_C += \
background.c \
mphalport.c \
bindings/espidf/__init__.c \
boards/$(BOARD)/board.c \
boards/$(BOARD)/pins.c \
shared/netutils/netutils.c \
Expand Down Expand Up @@ -248,8 +251,6 @@ ifneq ($(CIRCUITPY_BLEIO),0)
SRC_C += common-hal/_bleio/ble_events.c
endif

SRC_C += $(wildcard common-hal/espidf/*.c)

ifneq ($(CIRCUITPY_ESPCAMERA),0)
SRC_CAMERA := \
$(wildcard common-hal/espcamera/*.c) \
Expand All @@ -259,6 +260,20 @@ CFLAGS += -isystem esp32-camera/driver/include
CFLAGS += -isystem esp32-camera/conversions/include
endif

ifneq ($(CIRCUITPY_ESPIDF),0)
SRC_ESPIDF := \
$(wildcard common-hal/espidf/*.c) \
$(wildcard bindings/espidf/*.c)
SRC_C += $(SRC_ESPIDF)
endif

ifneq ($(CIRCUITPY_ESPNOW),0)
SRC_ESPNOW := \
$(wildcard common-hal/espnow/*.c) \
$(wildcard bindings/espnow/*.c)
SRC_C += $(SRC_ESPNOW)
endif

ifneq ($(CIRCUITPY_ESPULP),0)
SRC_ULP := \
$(wildcard common-hal/espulp/*.c) \
Expand Down
Loading