X_NUCLEO_IDB05A1

Dependencies:   mbed-os-example-ble-Advertising

Files at this revision

API Documentation at this revision

Comitter:
Wolfgang Betz
Date:
Thu Nov 19 11:04:31 2015 +0100
Parent:
176:33edcdbe9ce6
Child:
193:54dd09ddd5c3
Commit message:
Remove 'rising/falling edge' workaround

Changed in this revision

module.json Show annotated file Show diff for this revision Revisions of this file
source/BlueNRGDevice.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/module.json	Fri Nov 13 16:31:14 2015 +0100
+++ b/module.json	Thu Nov 19 11:04:31 2015 +0100
@@ -25,6 +25,7 @@
     "x-nucleo-idb0xa1/bluenrg-hci"
   ],
   "dependencies": {
+    "mbed-drivers": ">=0.11.2",
     "mbed-hal": "^1.0.0",
     "ble": "^2.0.0"
   }
--- a/source/BlueNRGDevice.cpp	Fri Nov 13 16:31:14 2015 +0100
+++ b/source/BlueNRGDevice.cpp	Thu Nov 19 11:04:31 2015 +0100
@@ -139,14 +139,6 @@
 	// Set the interrupt handler for the device
 	irq_.mode(PullDown); // betzw: set irq mode
 	irq_.rise(&HCI_Isr);
-
-	// betzw - WORKAROUND: exploit current mbed 'InterruptIn' implementation
-	//                     to handle spurious BlueNRG interrupts
-	irq_.fall(&HCI_Isr); // attach IRQ handler & enable IRQ 
-	irq_.fall(NULL);     // this doesn't clear the attachment but just disables the IRQ!
-                             // In this way spurious BlueNRG interrupts (e.g. IRQs happening
-	                     // even without being enabled) end up in a real IRQ handler 
-	                     // function rather than in a NULL pointer (i.e. in a hard fault).
 	
 	/* ToDo: Clear memory contents, reset the SD, etc. */
 	// By default, we set the device GAP role to PERIPHERAL