Indoor positioning. Peripheral unit.

Dependencies:   aconno_SEGGER_RTT

tasks/tasks.cpp

Committer:
jurica238814
Date:
2018-03-06
Revision:
0:ad937152493a

File content as of revision 0:ad937152493a:

/*
 *
 *
 */

#include "tasks.h"

#if DEBUG_LED
    extern DigitalOut advLed;
#endif

void bleF(BLE *ble)
{
    while(true)
    {
        ble->gap().startAdvertising();
        //printf("Advertisement started.\r\n");
        #if DEBUG_LED
            advLed = 0;
        #endif
        wait(ADVERTISING_DURATION_S);
        wait_ms(1000);
        ble->gap().stopAdvertising();
        //printf("Advertisement stopped.\r\n");
        #if DEBUG_LED
            advLed = 1;
        #endif
        wait(BLE_SLEEP_DURATION_S);
        wait_ms(1000);
    }
}