Skip to content

Commit 6e95133

Browse files
committed
Support BlueNRG-LP
1 parent 54af742 commit 6e95133

File tree

4 files changed

+295
-41
lines changed

4 files changed

+295
-41
lines changed

Diff for: examples/Peripheral/ButtonLED/ButtonLED.ino

+11-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
represents the state of the button.
77
88
The circuit:
9-
- STEVAL-MKSBOX1V1, B-L475E-IOT01A1, B_L4S5I_IOT01A, or a Nucleo board plus the X-NUCLEO-IDB05A2 or the X-NUCLEO-IDB05A1 or the X-NUCLEO-BNRG2A1
9+
- STEVAL-MKBOXPRO, STEVAL-MKSBOX1V1, B-L475E-IOT01A1, B_L4S5I_IOT01A, or a Nucleo board plus the X-NUCLEO-IDB05A2 or the X-NUCLEO-IDB05A1 or the X-NUCLEO-BNRG2A1
1010
1111
You can use a generic BLE central app, like LightBlue (iOS and Android) or
1212
nRF Connect (Android), to interact with the services and characteristics
@@ -17,7 +17,16 @@
1717

1818
#include <STM32duinoBLE.h>
1919

20-
#if defined(ARDUINO_STEVAL_MKSBOX1V1)
20+
#if defined(ARDUINO_STEVAL_MKBOXPRO)
21+
/* STEVAL-MKBOXPRO */
22+
SPIClass SpiHCI(PA7, PA6, PA5);
23+
HCISpiTransportClass HCISpiTransport(SpiHCI, BLUENRG_LP, PA2, PB11, PD4, 1000000, SPI_MODE3);
24+
#if !defined(FAKE_BLELOCALDEVICE)
25+
BLELocalDevice BLEObj(&HCISpiTransport);
26+
BLELocalDevice& BLE = BLEObj;
27+
#endif
28+
const int buttonPin = PC13; // set buttonPin to digital pin PC13
29+
#elif defined(ARDUINO_STEVAL_MKSBOX1V1)
2130
/* STEVAL-MKSBOX1V1 */
2231
SPIClass SpiHCI(PC3, PD3, PD1);
2332
HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_1S, PD0, PD4, PA8, 1000000, SPI_MODE1);

Diff for: keywords.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,5 @@ BLEUpdated LITERAL1
143143
SPBTLE_RF LITERAL1
144144
SPBTLE_1S LITERAL1
145145
BLUENRG_M2SP LITERAL1
146+
BLUENRG_LP LITERAL1
146147
BLEChip_t LITERAL1
147-

0 commit comments

Comments
 (0)