DIGITAL OUTPUT IS CONNECTED NOW TO THE LED (P0_19)

Dependencies:   BLE_API mbed nRF51822

Fork of BLENano_SimpleControls by RedBearLab

Revision:
2:3cd654f42efa
Parent:
1:81a97eb70d3d
Child:
3:f530ca03e014
diff -r 81a97eb70d3d -r 3cd654f42efa main.cpp
--- a/main.cpp	Fri Oct 31 14:44:32 2014 +0000
+++ b/main.cpp	Mon Jul 27 06:53:46 2015 +0000
@@ -18,7 +18,7 @@
 */
 
 #include "mbed.h"
-#include "BLEDevice.h"
+#include "ble/BLE.h"
 #include "Servo.h"
 
 
@@ -34,7 +34,7 @@
 #define SERVO_PIN                        P0_8       //RTS
 #define ANALOG_IN_PIN                    P0_4       //P04
 
-BLEDevice  ble;
+BLE             ble;
 
 DigitalOut      LED_SET(DIGITAL_OUT_PIN);
 DigitalIn       BUTTON(DIGITAL_IN_PIN);
@@ -78,12 +78,12 @@
     ble.startAdvertising();
 }
 
-void WrittenHandler(const GattCharacteristicWriteCBParams *Handler)
+void WrittenHandler(const GattWriteCallbackParams *Handler)
 {   
     uint8_t buf[TXRX_BUF_LEN];
     uint16_t bytesRead;
     
-    if (Handler->charHandle == txCharacteristic.getValueAttribute().getHandle()) 
+    if (Handler->handle == txCharacteristic.getValueAttribute().getHandle()) 
     {
         ble.readCharacteristicValue(txCharacteristic.getValueAttribute().getHandle(), buf, &bytesRead);
         memset(txPayload, 0, TXRX_BUF_LEN);