Bluetooth Low Energy template with prewritten functions and callbacks for BLE events.
Revision 1:46333f67c87a, committed 2018-06-22
- Comitter:
- jurica238814
- Date:
- Fri Jun 22 15:10:14 2018 +0200
- Parent:
- 0:dbe0ce913311
- Commit message:
- Source removed
Changed in this revision
| .hgignore | Show annotated file Show diff for this revision Revisions of this file |
| source/main.cpp | Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Fri Jun 22 15:10:14 2018 +0200 @@ -0,0 +1,2 @@ +source +/source$
--- a/source/main.cpp Fri Jun 22 15:05:42 2018 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * aconno.de
- * Simple program for aconno ble template demonstration
- *
- * Made by Jurica Resetar @ aconno
- * ResetarJurica@gmail.com
- *
- */
-
-#include "mbed.h"
-#include "aconnoBLE.h"
-#include "ble/BLE.h"
-#include "BLEData.h"
-#include "GapAdvertisingData.h"
-#include "BLEConfig.h"
-#include <list>
-
-advertisingFormat manufacturerSpecificData;
-headerFormat header;
-systemStateFormat systemState;
-timestampFormat timestamp;
-diagnoseFlagsFormat diagnoseFlags;
-
-int (*callback_)(int, int) = NULL; // pointer to a function
-
-int callbackFunction(int param1, int param2)
-{
- // Do some job
- return 1;
-}
-
-void primjer(int(*callback)(int, int))
-{
- callback_(1, 2);
-}
-
-int main()
-{
- //primjer(functionCallback);
-
- callback_ = callbackFunction;
- primjer(callback_);
-
- BLE &ble = BLE::Instance();
- ble.init(bleInitComplete);
- ble.gap().setTxPower(TX_POWER_dB); // Set TX power to TX_POWER
- while (ble.hasInitialized() == false) { }
-
- while(1)
- {}
-}