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:
commit
6e355ec598
@ -45,7 +45,6 @@
|
||||
#include "shared-bindings/_bleio/Address.h"
|
||||
#include "shared-bindings/_bleio/Characteristic.h"
|
||||
#include "shared-bindings/_bleio/Service.h"
|
||||
#include "shared-bindings/nvm/ByteArray.h"
|
||||
#include "shared-bindings/_bleio/Connection.h"
|
||||
#include "shared-bindings/_bleio/ScanEntry.h"
|
||||
#include "shared-bindings/time/__init__.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
// for __packed
|
||||
#include <string.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define BT_EATT_PSM 0x27
|
||||
#define BT_ATT_DEFAULT_LE_MTU 23
|
||||
|
@ -12,10 +12,15 @@
|
||||
#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
// for __packed
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#include "addr.h"
|
||||
|
||||
// ESP32S2 build environment defines this already.
|
||||
#ifndef BIT
|
||||
#define BIT(n) (1UL << (n))
|
||||
#endif
|
||||
|
||||
/* Special own address types for LL privacy (used in adv & scan parameters) */
|
||||
#define BT_HCI_OWN_ADDR_RPA_OR_PUBLIC 0x02
|
||||
|
@ -66,7 +66,7 @@ LDFLAGS += -static -static-libgcc -static-libstdc++
|
||||
endif
|
||||
|
||||
# source files
|
||||
SRC_C = \
|
||||
SRC_C += \
|
||||
main.c \
|
||||
gccollect.c \
|
||||
supervisor/stub/safe_mode.c \
|
||||
|
@ -11,12 +11,12 @@ LONGINT_IMPL = MPZ
|
||||
|
||||
# Not needed.
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_FRAMEBUFFERIO = 0
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_RGBMATRIX = 0
|
||||
CIRCUITPY_PS2IO = 0
|
||||
CIRCUITPY_AUDIOMP3 = 0
|
||||
|
||||
CIRCUITPY_BLEIO_HCI = 0
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_FRAMEBUFFERIO = 0
|
||||
CIRCUITPY_PS2IO = 0
|
||||
CIRCUITPY_RGBMATRIX = 0
|
||||
CIRCUITPY_ULAB = 0
|
||||
|
||||
# Override optimization to keep binary small
|
||||
|
@ -6,10 +6,6 @@ USB_MANUFACTURER = "Adafruit Industries LLC"
|
||||
CHIP_VARIANT = SAMD51J19A
|
||||
CHIP_FAMILY = samd51
|
||||
|
||||
# Support _bleio via the on-board ESP32 module.
|
||||
CIRCUITPY_BLEIO = 1
|
||||
CIRCUITPY_BLEIO_HCI = 1
|
||||
|
||||
QSPI_FLASH_FILESYSTEM = 1
|
||||
EXTERNAL_FLASH_DEVICE_COUNT = 3
|
||||
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"
|
||||
|
@ -18,7 +18,7 @@ LONGINT_IMPL = MPZ
|
||||
# Disable modules that are unusable on this special-purpose board.
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_AUDIOIO = 0
|
||||
CIRCUITPY_BLEIO = 0
|
||||
CIRCUITPY_BLEIO_HCI = 0
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_FRAMEBUFFERIO = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
|
@ -37,6 +37,9 @@ ifndef CIRCUITPY_TOUCHIO_USE_NATIVE
|
||||
CIRCUITPY_TOUCHIO_USE_NATIVE = 1
|
||||
endif
|
||||
|
||||
# No room for HCI _bleio on SAMD21.
|
||||
CIRCUITPY_BLEIO_HCI = 0
|
||||
|
||||
CIRCUITPY_SDCARDIO ?= 0
|
||||
|
||||
# Not enough RAM for framebuffers
|
||||
|
@ -162,7 +162,7 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE))
|
||||
|
||||
SRC_S = supervisor/cpu.s
|
||||
|
||||
SRC_C = \
|
||||
SRC_C += \
|
||||
background.c \
|
||||
fatfs_port.c \
|
||||
mphalport.c \
|
||||
|
@ -16,6 +16,7 @@ CIRCUITPY_ANALOGIO = 0
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_AUDIOIO = 0
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_BLEIO_HCI = 0
|
||||
CIRCUITPY_BOARD = 0
|
||||
CIRCUITPY_BUSIO = 0
|
||||
CIRCUITPY_COUNTIO = 0
|
||||
|
@ -147,7 +147,7 @@ SRC_SDK := \
|
||||
|
||||
SRC_SDK := $(addprefix sdk/devices/$(CHIP_FAMILY)/, $(SRC_SDK))
|
||||
|
||||
SRC_C = \
|
||||
SRC_C += \
|
||||
background.c \
|
||||
boards/$(BOARD)/board.c \
|
||||
boards/$(BOARD)/flash_config.c \
|
||||
|
@ -23,6 +23,9 @@ CIRCUITPY_AUDIOCORE ?= 1
|
||||
CIRCUITPY_AUDIOMIXER ?= 1
|
||||
CIRCUITPY_AUDIOPWMIO ?= 1
|
||||
|
||||
# Native BLEIO is not compatible with HCI _bleio.
|
||||
CIRCUITPY_BLEIO_HCI = 0
|
||||
|
||||
CIRCUITPY_BLEIO ?= 1
|
||||
|
||||
# No I2CPeripheral implementation
|
||||
|
@ -7,6 +7,7 @@ INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = NONE
|
||||
|
||||
CIRCUITPY_NVM = 1
|
||||
CIRCUITPY_BLEIO_HCI = 0
|
||||
|
||||
MCU_SERIES = F4
|
||||
MCU_VARIANT = STM32F411xE
|
||||
|
@ -134,7 +134,7 @@ SRC_MOD += modjni.c
|
||||
endif
|
||||
|
||||
# source files
|
||||
SRC_C = \
|
||||
SRC_C += \
|
||||
main.c \
|
||||
gccollect.c \
|
||||
unix_mphal.c \
|
||||
|
@ -79,14 +79,14 @@ CFLAGS += -DCIRCUITPY_AUDIOMP3=$(CIRCUITPY_AUDIOMP3)
|
||||
CIRCUITPY_BITBANGIO ?= $(CIRCUITPY_FULL_BUILD)
|
||||
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
|
||||
CIRCUITPY_BLEIO_HCI ?= 0
|
||||
CIRCUITPY_BLEIO_HCI ?= $(CIRCUITPY_FULL_BUILD)
|
||||
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
|
||||
CFLAGS += -DCIRCUITPY_BOARD=$(CIRCUITPY_BOARD)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user