Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Hello_BLE F446RE-BLE
Fork of X_NUCLEO_IDB0XA1 by
Revision 99:c6e075b517c2, committed 2015-07-24
- Comitter:
- Wolfgang Betz
- Date:
- Fri Jul 24 08:20:47 2015 +0200
- Parent:
- 92:709d44dc869a
- Child:
- 100:76c16a800273
- Commit message:
- Make things work for standard Arduino
Changed in this revision
--- a/BlueNRGDevice.cpp Thu Jul 23 14:22:55 2015 +0200
+++ b/BlueNRGDevice.cpp Fri Jul 24 08:20:47 2015 +0200
@@ -61,12 +61,12 @@
* This is using Arduino pins as follows:
* D11: MOSI line of SPI interface
* D12: MISO line of SPI interface
-* D3 : SCK line of SPI interface
+* D13: SCK line of SPI interface
* A1 : nCS line of SPI interface
* D7 : BlueNRG reset
* A0 : BlueNRG IRQ pin
*/
-BlueNRGDevice bluenrgDeviceInstance(D11, D12, D3, A1, D7, A0);
+BlueNRGDevice bluenrgDeviceInstance(D11, D12, D13, A1, D7, A0);
/**
* BLE-API requires an implementation of the following function in order to
@@ -127,6 +127,7 @@
ble_error_t BlueNRGDevice::init(void)
{
// Set the interrupt handler for the device
+ irq_.mode(PullNone); // betzw: set irq mode
irq_.rise(&HCI_Isr);
/* ToDo: Clear memory contents, reset the SD, etc. */
--- a/BlueNRGGap.cpp Thu Jul 23 14:22:55 2015 +0200
+++ b/BlueNRGGap.cpp Fri Jul 24 08:20:47 2015 +0200
@@ -520,7 +520,7 @@
//Re-Init the BTLE Device with SetAddress as true
//if(BlueNRGDevice::getIsInitialized())//Re-init only initialization is already done
// ANDREA
- //btle_init(isSetAddress, D11, D12, D3);
+ //btle_init(isSetAddress, D11, D12, D13);
//if (ret==BLE_STATUS_SUCCESS)
return BLE_ERROR_NONE;
--- a/platform/inc/bluenrg_platform.h Thu Jul 23 14:22:55 2015 +0200 +++ b/platform/inc/bluenrg_platform.h Fri Jul 24 08:20:47 2015 +0200 @@ -46,12 +46,12 @@ #endif #ifdef MBED_NUCLEO_PLATFORM -PinName PIN_SPI_MOSI=PA_7;//D12 -PinName PIN_SPI_MISO=PA_6;//D11 -PinName PIN_SPI_CLK=PB_3;//D3 -PinName PIN_SPI_CS=PA_1;//A1 -PinName PIN_SPI_RESET=PA_8;//D7 -PinName PIN_SPI_IRQ=PA_0;//A0 +PinName PIN_SPI_MOSI=D12;//PA_7 +PinName PIN_SPI_MISO=D11;//PA_6 +PinName PIN_SPI_CLK=D13;//PA_5 +PinName PIN_SPI_CS=A1;//PA_1 +PinName PIN_SPI_RESET=D7;//PA_8 +PinName PIN_SPI_IRQ=A0;//PA_0 #endif #endif //__PLATFORM_H_
