Skip to content

Commit 6e355ec

Browse files
authored
Merge pull request #3560 from dhalbert/pervasive-bleio-hci
enable CIRCUITPY_BLEIO_HCI on non-nRF boards where it will fit
2 parents 2ab1552 + 12ed3fc commit 6e355ec

File tree

15 files changed

+29
-21
lines changed

15 files changed

+29
-21
lines changed

devices/ble_hci/common-hal/_bleio/Adapter.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
#include "shared-bindings/_bleio/Address.h"
4646
#include "shared-bindings/_bleio/Characteristic.h"
4747
#include "shared-bindings/_bleio/Service.h"
48-
#include "shared-bindings/nvm/ByteArray.h"
4948
#include "shared-bindings/_bleio/Connection.h"
5049
#include "shared-bindings/_bleio/ScanEntry.h"
5150
#include "shared-bindings/time/__init__.h"

devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <stdbool.h>
1313
// for __packed
14-
#include <string.h>
14+
#include <sys/cdefs.h>
1515

1616
#define BT_EATT_PSM 0x27
1717
#define BT_ATT_DEFAULT_LE_MTU 23

devices/ble_hci/common-hal/_bleio/hci_include/hci.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_
1313

1414
#include <stdbool.h>
15-
#include <string.h>
15+
// for __packed
16+
#include <sys/cdefs.h>
17+
1618
#include "addr.h"
1719

20+
// ESP32S2 build environment defines this already.
21+
#ifndef BIT
1822
#define BIT(n) (1UL << (n))
23+
#endif
1924

2025
/* Special own address types for LL privacy (used in adv & scan parameters) */
2126
#define BT_HCI_OWN_ADDR_RPA_OR_PUBLIC 0x02

mpy-cross/mpy-cross.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ LDFLAGS += -static -static-libgcc -static-libstdc++
6666
endif
6767

6868
# source files
69-
SRC_C = \
69+
SRC_C += \
7070
main.c \
7171
gccollect.c \
7272
supervisor/stub/safe_mode.c \

ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ LONGINT_IMPL = MPZ
1111

1212
# Not needed.
1313
CIRCUITPY_AUDIOBUSIO = 0
14-
CIRCUITPY_FRAMEBUFFERIO = 0
14+
CIRCUITPY_AUDIOMP3 = 0
15+
CIRCUITPY_BLEIO_HCI = 0
1516
CIRCUITPY_DISPLAYIO = 0
16-
CIRCUITPY_RGBMATRIX = 0
17+
CIRCUITPY_FRAMEBUFFERIO = 0
1718
CIRCUITPY_PS2IO = 0
18-
CIRCUITPY_AUDIOMP3 = 0
19-
19+
CIRCUITPY_RGBMATRIX = 0
2020
CIRCUITPY_ULAB = 0
2121

2222
# Override optimization to keep binary small

ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ USB_MANUFACTURER = "Adafruit Industries LLC"
66
CHIP_VARIANT = SAMD51J19A
77
CHIP_FAMILY = samd51
88

9-
# Support _bleio via the on-board ESP32 module.
10-
CIRCUITPY_BLEIO = 1
11-
CIRCUITPY_BLEIO_HCI = 1
12-
139
QSPI_FLASH_FILESYSTEM = 1
1410
EXTERNAL_FLASH_DEVICE_COUNT = 3
1511
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"

ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LONGINT_IMPL = MPZ
1818
# Disable modules that are unusable on this special-purpose board.
1919
CIRCUITPY_AUDIOBUSIO = 0
2020
CIRCUITPY_AUDIOIO = 0
21-
CIRCUITPY_BLEIO = 0
21+
CIRCUITPY_BLEIO_HCI = 0
2222
CIRCUITPY_DISPLAYIO = 0
2323
CIRCUITPY_FRAMEBUFFERIO = 0
2424
CIRCUITPY_GAMEPAD = 0

ports/atmel-samd/mpconfigport.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ ifndef CIRCUITPY_TOUCHIO_USE_NATIVE
3737
CIRCUITPY_TOUCHIO_USE_NATIVE = 1
3838
endif
3939

40+
# No room for HCI _bleio on SAMD21.
41+
CIRCUITPY_BLEIO_HCI = 0
42+
4043
CIRCUITPY_SDCARDIO ?= 0
4144

4245
# Not enough RAM for framebuffers

ports/cxd56/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE))
162162

163163
SRC_S = supervisor/cpu.s
164164

165-
SRC_C = \
165+
SRC_C += \
166166
background.c \
167167
fatfs_port.c \
168168
mphalport.c \

ports/litex/mpconfigport.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ CIRCUITPY_ANALOGIO = 0
1616
CIRCUITPY_AUDIOBUSIO = 0
1717
CIRCUITPY_AUDIOIO = 0
1818
CIRCUITPY_BITBANGIO = 0
19+
CIRCUITPY_BLEIO_HCI = 0
1920
CIRCUITPY_BOARD = 0
2021
CIRCUITPY_BUSIO = 0
2122
CIRCUITPY_COUNTIO = 0

0 commit comments

Comments
 (0)