![](/media/cache/profiles/b5c4ec91390a6fbccf8d918d443563ed.jpg.50x50_q85.jpg)
Lizzy project
Dependencies: aconno_I2C Lis2dh12 adc52832_common aconno_SEGGER_RTT
aconno_ble/aconno_ble.h@22:7dae8496b97c, 2018-09-13 (annotated)
- Committer:
- jurica238814
- Date:
- Thu Sep 13 15:14:14 2018 +0200
- Branch:
- SimpleGATTExample
- Revision:
- 22:7dae8496b97c
- Parent:
- 19:2681edc2f2b9
LAUT example program
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jurica238814 | 0:fc77522f4d28 | 1 | /* |
jurica238814 | 0:fc77522f4d28 | 2 | * Made by Jurica Resetar @ aconno |
jurica238814 | 0:fc77522f4d28 | 3 | * More info @ aconno.de |
jurica238814 | 0:fc77522f4d28 | 4 | * jurica_resetar@yahoo.com |
jurica238814 | 0:fc77522f4d28 | 5 | */ |
jurica238814 | 0:fc77522f4d28 | 6 | |
jurica238814 | 0:fc77522f4d28 | 7 | #ifndef ACONNO_BLE_H |
jurica238814 | 0:fc77522f4d28 | 8 | #define ACONNO_BLE_H |
jurica238814 | 0:fc77522f4d28 | 9 | |
jurica238814 | 0:fc77522f4d28 | 10 | #include "mbed.h" |
jurica238814 | 0:fc77522f4d28 | 11 | #include "ble/BLE.h" |
jurica238814 | 0:fc77522f4d28 | 12 | #include "GapAdvertisingData.h" |
dbartolovic | 8:7ba4f82de9b6 | 13 | #include "lizzy_service.h" |
jurica238814 | 0:fc77522f4d28 | 14 | |
jurica238814 | 0:fc77522f4d28 | 15 | #define MSD_SIZE_b (10) |
jurica238814 | 19:2681edc2f2b9 | 16 | #define ADV_INTERVAL_MS (1000) |
jurica238814 | 22:7dae8496b97c | 17 | #define APPLICATION_ID (0x9A780059) //(0xCF170059) |
dbartolovic | 8:7ba4f82de9b6 | 18 | |
jurica238814 | 0:fc77522f4d28 | 19 | /* Global variables and constants */ |
jurica238814 | 0:fc77522f4d28 | 20 | struct __attribute__((packed, aligned(1))) advertising_packet{ |
jurica238814 | 0:fc77522f4d28 | 21 | uint32_t header; |
jurica238814 | 0:fc77522f4d28 | 22 | uint8_t type; |
jurica238814 | 0:fc77522f4d28 | 23 | }; |
jurica238814 | 0:fc77522f4d28 | 24 | |
dbartolovic | 8:7ba4f82de9b6 | 25 | extern LizzyService *lizzy_service; |
dbartolovic | 8:7ba4f82de9b6 | 26 | |
jurica238814 | 0:fc77522f4d28 | 27 | /* Function declarations */ |
jurica238814 | 0:fc77522f4d28 | 28 | void bleInitComplete(BLE::InitializationCompleteCallbackContext *params); |
jurica238814 | 0:fc77522f4d28 | 29 | void updatePayload(BLE *ble, advertising_packet *advertisementPacket); |
jurica238814 | 0:fc77522f4d28 | 30 | |
jurica238814 | 0:fc77522f4d28 | 31 | |
jurica238814 | 19:2681edc2f2b9 | 32 | #endif //ACONNO_BLE_H |