From 8f0e11671858e011a75eec01801f669d50ed1b88 Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Fri, 25 Sep 2020 13:39:19 +0200 Subject: [PATCH] Modify the examples to run on the nucleo_wb55rg board Signed-off-by: Francois Ramu --- examples/Central/LedControl/LedControl.ino | 5 +++++ examples/Central/PeripheralExplorer/PeripheralExplorer.ino | 4 ++++ examples/Central/Scan/Scan.ino | 4 ++++ examples/Central/ScanCallback/ScanCallback.ino | 4 ++++ examples/Central/SensorTagButton/SensorTagButton.ino | 4 ++++ examples/Peripheral/ButtonLED/ButtonLED.ino | 5 +++++ examples/Peripheral/CallbackLED/CallbackLED.ino | 4 ++++ examples/Peripheral/LED/LED.ino | 4 ++++ 8 files changed, 34 insertions(+) diff --git a/examples/Central/LedControl/LedControl.ino b/examples/Central/LedControl/LedControl.ino index 4eec9259..2b916c53 100644 --- a/examples/Central/LedControl/LedControl.ino +++ b/examples/Central/LedControl/LedControl.ino @@ -28,6 +28,11 @@ SPIClass SpiHCI(PC12, PC11, PC10); HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0); BLELocalDevice BLE(&HCISpiTransport); const int buttonPin = PC13; // set buttonPin to digital pin PC13 +#elif defined(ARDUINO_PNUCLEO_WB55RG) +/* PNUCLEO_WB55RG */ +HCISharedMemTransportClass HCISharedMemTransport; +BLELocalDevice BLE(&HCISharedMemTransport); +const int buttonPin = PC4; // set buttonPin to digital pin PC4 #else /* Shield IDB05A2 with SPI clock on D3 */ SPIClass SpiHCI(D11, D12, D3); diff --git a/examples/Central/PeripheralExplorer/PeripheralExplorer.ino b/examples/Central/PeripheralExplorer/PeripheralExplorer.ino index 5f33e4bd..5d5da6a3 100644 --- a/examples/Central/PeripheralExplorer/PeripheralExplorer.ino +++ b/examples/Central/PeripheralExplorer/PeripheralExplorer.ino @@ -25,6 +25,10 @@ BLELocalDevice BLE(&HCISpiTransport); SPIClass SpiHCI(PC12, PC11, PC10); HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0); BLELocalDevice BLE(&HCISpiTransport); +#elif defined(ARDUINO_PNUCLEO_WB55RG) +/* PNUCLEO_WB55RG */ +HCISharedMemTransportClass HCISharedMemTransport; +BLELocalDevice BLE(&HCISharedMemTransport); #else /* Shield IDB05A2 with SPI clock on D3 */ SPIClass SpiHCI(D11, D12, D3); diff --git a/examples/Central/Scan/Scan.ino b/examples/Central/Scan/Scan.ino index 30e382e5..8d1357b3 100644 --- a/examples/Central/Scan/Scan.ino +++ b/examples/Central/Scan/Scan.ino @@ -22,6 +22,10 @@ BLELocalDevice BLE(&HCISpiTransport); SPIClass SpiHCI(PC12, PC11, PC10); HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0); BLELocalDevice BLE(&HCISpiTransport); +#elif defined(ARDUINO_PNUCLEO_WB55RG) +/* PNUCLEO_WB55RG */ +HCISharedMemTransportClass HCISharedMemTransport; +BLELocalDevice BLE(&HCISharedMemTransport); #else /* Shield IDB05A2 with SPI clock on D3 */ SPIClass SpiHCI(D11, D12, D3); diff --git a/examples/Central/ScanCallback/ScanCallback.ino b/examples/Central/ScanCallback/ScanCallback.ino index e7c1711e..0cf28c57 100644 --- a/examples/Central/ScanCallback/ScanCallback.ino +++ b/examples/Central/ScanCallback/ScanCallback.ino @@ -24,6 +24,10 @@ BLELocalDevice BLE(&HCISpiTransport); SPIClass SpiHCI(PC12, PC11, PC10); HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0); BLELocalDevice BLE(&HCISpiTransport); +#elif defined(ARDUINO_PNUCLEO_WB55RG) +/* PNUCLEO_WB55RG */ +HCISharedMemTransportClass HCISharedMemTransport; +BLELocalDevice BLE(&HCISharedMemTransport); #else /* Shield IDB05A2 with SPI clock on D3 */ SPIClass SpiHCI(D11, D12, D3); diff --git a/examples/Central/SensorTagButton/SensorTagButton.ino b/examples/Central/SensorTagButton/SensorTagButton.ino index 0fdfdb13..fdb469d3 100644 --- a/examples/Central/SensorTagButton/SensorTagButton.ino +++ b/examples/Central/SensorTagButton/SensorTagButton.ino @@ -26,6 +26,10 @@ BLELocalDevice BLE(&HCISpiTransport); SPIClass SpiHCI(PC12, PC11, PC10); HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0); BLELocalDevice BLE(&HCISpiTransport); +#elif defined(ARDUINO_PNUCLEO_WB55RG) +/* PNUCLEO_WB55RG */ +HCISharedMemTransportClass HCISharedMemTransport; +BLELocalDevice BLE(&HCISharedMemTransport); #else /* Shield IDB05A2 with SPI clock on D3 */ SPIClass SpiHCI(D11, D12, D3); diff --git a/examples/Peripheral/ButtonLED/ButtonLED.ino b/examples/Peripheral/ButtonLED/ButtonLED.ino index e343fb26..a84fbd92 100644 --- a/examples/Peripheral/ButtonLED/ButtonLED.ino +++ b/examples/Peripheral/ButtonLED/ButtonLED.ino @@ -29,6 +29,11 @@ SPIClass SpiHCI(PC12, PC11, PC10); HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0); BLELocalDevice BLE(&HCISpiTransport); const int buttonPin = PC13; // set buttonPin to digital pin PC13 +#elif defined(ARDUINO_PNUCLEO_WB55RG) +/* PNUCLEO_WB55RG */ +HCISharedMemTransportClass HCISharedMemTransport; +BLELocalDevice BLE(&HCISharedMemTransport); +const int buttonPin = PC4; // set buttonPin to digital pin PC4 #else /* Shield IDB05A2 with SPI clock on D3 */ SPIClass SpiHCI(D11, D12, D3); diff --git a/examples/Peripheral/CallbackLED/CallbackLED.ino b/examples/Peripheral/CallbackLED/CallbackLED.ino index 44be0e39..b1d5da94 100644 --- a/examples/Peripheral/CallbackLED/CallbackLED.ino +++ b/examples/Peripheral/CallbackLED/CallbackLED.ino @@ -27,6 +27,10 @@ BLELocalDevice BLE(&HCISpiTransport); SPIClass SpiHCI(PC12, PC11, PC10); HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0); BLELocalDevice BLE(&HCISpiTransport); +#elif defined(ARDUINO_PNUCLEO_WB55RG) +/* PNUCLEO_WB55RG */ +HCISharedMemTransportClass HCISharedMemTransport; +BLELocalDevice BLE(&HCISharedMemTransport); #else /* Shield IDB05A2 with SPI clock on D3 */ SPIClass SpiHCI(D11, D12, D3); diff --git a/examples/Peripheral/LED/LED.ino b/examples/Peripheral/LED/LED.ino index 8269bfcc..d7748474 100644 --- a/examples/Peripheral/LED/LED.ino +++ b/examples/Peripheral/LED/LED.ino @@ -25,6 +25,10 @@ BLELocalDevice BLE(&HCISpiTransport); SPIClass SpiHCI(PC12, PC11, PC10); HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, SPI_MODE0); BLELocalDevice BLE(&HCISpiTransport); +#elif defined(ARDUINO_PNUCLEO_WB55RG) +/* PNUCLEO_WB55RG */ +HCISharedMemTransportClass HCISharedMemTransport; +BLELocalDevice BLE(&HCISharedMemTransport); #else /* Shield IDB05A2 with SPI clock on D3 */ SPIClass SpiHCI(D11, D12, D3);