Merge pull request #3560 from dhalbert/pervasive-bleio-hci

enable CIRCUITPY_BLEIO_HCI on non-nRF boards where it will fit
This commit is contained in:
Scott Shawcroft 2020-10-16 10:00:50 -07:00 committed by GitHub
commit 6e355ec598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 30 additions and 22 deletions

View File

@ -45,7 +45,6 @@
#include "shared-bindings/_bleio/Address.h" #include "shared-bindings/_bleio/Address.h"
#include "shared-bindings/_bleio/Characteristic.h" #include "shared-bindings/_bleio/Characteristic.h"
#include "shared-bindings/_bleio/Service.h" #include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/nvm/ByteArray.h"
#include "shared-bindings/_bleio/Connection.h" #include "shared-bindings/_bleio/Connection.h"
#include "shared-bindings/_bleio/ScanEntry.h" #include "shared-bindings/_bleio/ScanEntry.h"
#include "shared-bindings/time/__init__.h" #include "shared-bindings/time/__init__.h"

View File

@ -11,7 +11,7 @@
#include <stdbool.h> #include <stdbool.h>
// for __packed // for __packed
#include <string.h> #include <sys/cdefs.h>
#define BT_EATT_PSM 0x27 #define BT_EATT_PSM 0x27
#define BT_ATT_DEFAULT_LE_MTU 23 #define BT_ATT_DEFAULT_LE_MTU 23

View File

@ -12,10 +12,15 @@
#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_ #define ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_
#include <stdbool.h> #include <stdbool.h>
#include <string.h> // for __packed
#include <sys/cdefs.h>
#include "addr.h" #include "addr.h"
// ESP32S2 build environment defines this already.
#ifndef BIT
#define BIT(n) (1UL << (n)) #define BIT(n) (1UL << (n))
#endif
/* Special own address types for LL privacy (used in adv & scan parameters) */ /* Special own address types for LL privacy (used in adv & scan parameters) */
#define BT_HCI_OWN_ADDR_RPA_OR_PUBLIC 0x02 #define BT_HCI_OWN_ADDR_RPA_OR_PUBLIC 0x02

View File

@ -66,7 +66,7 @@ LDFLAGS += -static -static-libgcc -static-libstdc++
endif endif
# source files # source files
SRC_C = \ SRC_C += \
main.c \ main.c \
gccollect.c \ gccollect.c \
supervisor/stub/safe_mode.c \ supervisor/stub/safe_mode.c \

View File

@ -11,12 +11,12 @@ LONGINT_IMPL = MPZ
# Not needed. # Not needed.
CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_FRAMEBUFFERIO = 0
CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0
CIRCUITPY_AUDIOMP3 = 0 CIRCUITPY_AUDIOMP3 = 0
CIRCUITPY_BLEIO_HCI = 0
CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_FRAMEBUFFERIO = 0
CIRCUITPY_PS2IO = 0
CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_ULAB = 0 CIRCUITPY_ULAB = 0
# Override optimization to keep binary small # Override optimization to keep binary small

View File

@ -6,10 +6,6 @@ USB_MANUFACTURER = "Adafruit Industries LLC"
CHIP_VARIANT = SAMD51J19A CHIP_VARIANT = SAMD51J19A
CHIP_FAMILY = samd51 CHIP_FAMILY = samd51
# Support _bleio via the on-board ESP32 module.
CIRCUITPY_BLEIO = 1
CIRCUITPY_BLEIO_HCI = 1
QSPI_FLASH_FILESYSTEM = 1 QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICE_COUNT = 3
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"

View File

@ -18,7 +18,7 @@ LONGINT_IMPL = MPZ
# Disable modules that are unusable on this special-purpose board. # Disable modules that are unusable on this special-purpose board.
CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOIO = 0
CIRCUITPY_BLEIO = 0 CIRCUITPY_BLEIO_HCI = 0
CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0
CIRCUITPY_GAMEPAD = 0 CIRCUITPY_GAMEPAD = 0

View File

@ -37,6 +37,9 @@ ifndef CIRCUITPY_TOUCHIO_USE_NATIVE
CIRCUITPY_TOUCHIO_USE_NATIVE = 1 CIRCUITPY_TOUCHIO_USE_NATIVE = 1
endif endif
# No room for HCI _bleio on SAMD21.
CIRCUITPY_BLEIO_HCI = 0
CIRCUITPY_SDCARDIO ?= 0 CIRCUITPY_SDCARDIO ?= 0
# Not enough RAM for framebuffers # Not enough RAM for framebuffers

View File

@ -162,7 +162,7 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE))
SRC_S = supervisor/cpu.s SRC_S = supervisor/cpu.s
SRC_C = \ SRC_C += \
background.c \ background.c \
fatfs_port.c \ fatfs_port.c \
mphalport.c \ mphalport.c \

View File

@ -16,6 +16,7 @@ CIRCUITPY_ANALOGIO = 0
CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOIO = 0
CIRCUITPY_BITBANGIO = 0 CIRCUITPY_BITBANGIO = 0
CIRCUITPY_BLEIO_HCI = 0
CIRCUITPY_BOARD = 0 CIRCUITPY_BOARD = 0
CIRCUITPY_BUSIO = 0 CIRCUITPY_BUSIO = 0
CIRCUITPY_COUNTIO = 0 CIRCUITPY_COUNTIO = 0

View File

@ -147,7 +147,7 @@ SRC_SDK := \
SRC_SDK := $(addprefix sdk/devices/$(CHIP_FAMILY)/, $(SRC_SDK)) SRC_SDK := $(addprefix sdk/devices/$(CHIP_FAMILY)/, $(SRC_SDK))
SRC_C = \ SRC_C += \
background.c \ background.c \
boards/$(BOARD)/board.c \ boards/$(BOARD)/board.c \
boards/$(BOARD)/flash_config.c \ boards/$(BOARD)/flash_config.c \

View File

@ -23,6 +23,9 @@ CIRCUITPY_AUDIOCORE ?= 1
CIRCUITPY_AUDIOMIXER ?= 1 CIRCUITPY_AUDIOMIXER ?= 1
CIRCUITPY_AUDIOPWMIO ?= 1 CIRCUITPY_AUDIOPWMIO ?= 1
# Native BLEIO is not compatible with HCI _bleio.
CIRCUITPY_BLEIO_HCI = 0
CIRCUITPY_BLEIO ?= 1 CIRCUITPY_BLEIO ?= 1
# No I2CPeripheral implementation # No I2CPeripheral implementation

View File

@ -7,6 +7,7 @@ INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_NVM = 1 CIRCUITPY_NVM = 1
CIRCUITPY_BLEIO_HCI = 0
MCU_SERIES = F4 MCU_SERIES = F4
MCU_VARIANT = STM32F411xE MCU_VARIANT = STM32F411xE

View File

@ -134,7 +134,7 @@ SRC_MOD += modjni.c
endif endif
# source files # source files
SRC_C = \ SRC_C += \
main.c \ main.c \
gccollect.c \ gccollect.c \
unix_mphal.c \ unix_mphal.c \

View File

@ -79,14 +79,14 @@ CFLAGS += -DCIRCUITPY_AUDIOMP3=$(CIRCUITPY_AUDIOMP3)
CIRCUITPY_BITBANGIO ?= $(CIRCUITPY_FULL_BUILD) CIRCUITPY_BITBANGIO ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_BITBANGIO=$(CIRCUITPY_BITBANGIO) CFLAGS += -DCIRCUITPY_BITBANGIO=$(CIRCUITPY_BITBANGIO)
# Explicitly enabled for boards that support _bleio.
CIRCUITPY_BLEIO ?= 0
CFLAGS += -DCIRCUITPY_BLEIO=$(CIRCUITPY_BLEIO)
# _bleio can be supported on most any board via HCI # _bleio can be supported on most any board via HCI
CIRCUITPY_BLEIO_HCI ?= 0 CIRCUITPY_BLEIO_HCI ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_BLEIO_HCI=$(CIRCUITPY_BLEIO_HCI) CFLAGS += -DCIRCUITPY_BLEIO_HCI=$(CIRCUITPY_BLEIO_HCI)
# Explicitly enabled for boards that support _bleio.
CIRCUITPY_BLEIO ?= $(CIRCUITPY_BLEIO_HCI)
CFLAGS += -DCIRCUITPY_BLEIO=$(CIRCUITPY_BLEIO)
CIRCUITPY_BOARD ?= 1 CIRCUITPY_BOARD ?= 1
CFLAGS += -DCIRCUITPY_BOARD=$(CIRCUITPY_BOARD) CFLAGS += -DCIRCUITPY_BOARD=$(CIRCUITPY_BOARD)