test publish

Dependencies:   BLE_API nRF51822 mbed

Fork of KS7 by masaaki makabe

Files at this revision

API Documentation at this revision

Comitter:
masaaki_makabe
Date:
Fri Aug 12 04:07:00 2016 +0000
Branch:
KS3
Parent:
33:d7b53d548c33
Commit message:
???????????????????????????????

Changed in this revision

CurrentTimeService.h Show annotated file Show diff for this revision Revisions of this file
io.lib Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.lib Show annotated file Show diff for this revision Revisions of this file
--- a/CurrentTimeService.h	Wed Aug 10 06:56:36 2016 +0000
+++ b/CurrentTimeService.h	Fri Aug 12 04:07:00 2016 +0000
@@ -169,23 +169,9 @@
     // for BLE GATT callback (optional)
     virtual void onDataWritten(const GattWriteCallbackParams *params)
     {
-#ifdef UART_DEBUG
-        //pc.printf("onDataWritten START\r\n");
-#endif
         if (params->handle == currentTimeCharacteristic.getValueHandle()) {
             memcpy((void *)&valueBytes, params->data, params->len);
-#ifdef UART_DEBUG
-            int i;
-            pc.printf("TIME=>");
-            for(i = 0; i < sizeof(valueBytes); i++){
-                pc.printf("[%02X]", valueBytes[i]);
-            }
-            pc.printf("\r\n");
-#endif
         }
-#ifdef UART_DEBUG
-        //pc.printf("onDataWritten END\r\n");
-#endif
     }
  
     int getCounter() const { return counter; }
@@ -203,4 +189,4 @@
 };
  
 #endif /* #ifndef __BLE_CURRENT_TIME_SERVICE_H__*/
- 
\ No newline at end of file
+ 
--- a/io.lib	Wed Aug 10 06:56:36 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://developer.mbed.org/users/akita11/code/io/#fb7e64f92fbe
--- a/main.cpp	Wed Aug 10 06:56:36 2016 +0000
+++ b/main.cpp	Fri Aug 12 04:07:00 2016 +0000
@@ -54,6 +54,7 @@
 /*S---------------------------------------------------------------*/
 //io io(P0_15, P0_13); // HX711's CLK & DAT
 exio io;
+DFUService *p_dfu;
 /*E---------------------------------------------------------------*/
 //io(P0_5, P0_4); // HX711's CLK & DAT for BLEnano debug
 uint32_t weight_data;
@@ -258,9 +259,9 @@
 /*E-----------------------------------------------------------------------*/        
     ble.addService(HWS);
     ble.addService(DIS);
-// これをコメントにするとライトできた!!
-//   DFUService dfu(ble);
-    
+// DFUサービスがスタックに割り当たっていたのをヒープへ移動
+   //DFUService dfu(ble);
+    p_dfu = new DFUService(ble);
 }
 /*S---------------------------------------------------------------------*/
 /*キー押されて1sec経過すればコールバックされる*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.lib	Fri Aug 12 04:07:00 2016 +0000
@@ -0,0 +1,1 @@
+KS7/mbed#000000000000