![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
AKM Development Platform. This is the D7.014 version.
Dependencies: AK09970 AK099XX AK7401 AK7451 AK8963X AK9750 AK9752 AkmSensor BLE_API I2CNano MCP342x SerialNano SpiNano TCA9554A mbed nRF51822
Fork of AKDP by
Diff: main.cpp
- Revision:
- 11:53e52f5f1051
- Parent:
- 10:a710e8c3311c
- Child:
- 12:522a22a23f8a
--- a/main.cpp Sat Jun 11 00:18:38 2016 +0000 +++ b/main.cpp Thu Jun 16 18:37:41 2016 +0000 @@ -18,6 +18,8 @@ #define CR '\r' #define LF '\n' +#define DEVICE_NAME "AKDP Rev002" + BLE ble; UARTService* uartService; #ifndef REV_D @@ -140,15 +142,15 @@ ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED); ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED); ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::SHORTENED_LOCAL_NAME, - (const uint8_t *)"AKDP RevD 001", sizeof("AKDP RevD 001") - 1); + (const uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME) - 1); ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_128BIT_SERVICE_IDS, (const uint8_t *)UARTServiceUUID_reversed, sizeof(UARTServiceUUID_reversed)); ble.gap().onConnection(connectionCallback); ble.gap().onDisconnection(disconnectionCallback); ble.gattServer().onDataWritten(WrittenHandler); - // 100ms; in multiples of 0.625ms. - ble.gap().setAdvertisingInterval(80); + // 40ms; in multiples of 0.625ms. + ble.gap().setAdvertisingInterval(64); ble.gap().startAdvertising(); // BLE UART service @@ -159,7 +161,9 @@ if( manager->init() == AkmSensorManager::ERROR){ MSG("#Error: sensor is NULL\n"); } - + + MSG("#Connecting...\n"); + // main loop while(1) {