21
21
22
22
#include " ble/BLE.h"
23
23
#include " CircularBuffer.h"
24
+ #include " Timer.h"
25
+ #include " Ticker.h"
26
+ #include " Timeout.h"
27
+
24
28
static const uint8_t BEACON_EDDYSTONE[] = {0xAA , 0xFE };
25
29
26
30
// Debug is disabled by default
@@ -75,7 +79,7 @@ class EddystoneService
75
79
void (*frames[EDDYSTONE_MAX_FRAMETYPE])(uint8_t *, uint32_t );
76
80
static const int URI_DATA_MAX = 18 ;
77
81
typedef uint8_t UriData_t[URI_DATA_MAX];
78
- CircularBuffer<FrameTypes, EDDYSTONE_MAX_FRAMETYPE> overflow;
82
+ mbed:: CircularBuffer<FrameTypes, EDDYSTONE_MAX_FRAMETYPE> overflow;
79
83
80
84
// UID Frame Type subfields
81
85
static const int UID_NAMESPACEID_SIZE = 10 ;
@@ -542,11 +546,11 @@ class EddystoneService
542
546
BLEDevice &ble;
543
547
uint16_t advPeriodus;
544
548
uint8_t txPower;
545
- Timer timeSinceBootTimer;
549
+ mbed:: Timer timeSinceBootTimer;
546
550
volatile uint32_t lastBootTimerRead;
547
551
volatile bool advLock;
548
552
volatile FrameTypes frameIndex;
549
- Timeout stopAdv;
553
+ mbed:: Timeout stopAdv;
550
554
551
555
552
556
// URI Frame Variables
@@ -555,7 +559,7 @@ class EddystoneService
555
559
int8_t defaultUrlPower;
556
560
bool urlIsSet; // flag that enables / disable URI Frames
557
561
float urlAdvPeriod; // how long the url frame will be advertised for
558
- Ticker urlTicker;
562
+ mbed:: Ticker urlTicker;
559
563
560
564
// UID Frame Variables
561
565
UIDNamespaceID_t defaultUidNamespaceID;
@@ -564,7 +568,7 @@ class EddystoneService
564
568
uint16_t uidRFU;
565
569
bool uidIsSet; // flag that enables / disable UID Frames
566
570
float uidAdvPeriod; // how long the uid frame will be advertised for
567
- Ticker uidTicker;
571
+ mbed:: Ticker uidTicker;
568
572
569
573
// TLM Frame Variables
570
574
uint8_t TlmVersion;
@@ -574,7 +578,7 @@ class EddystoneService
574
578
volatile uint32_t TlmTimeSinceBoot;
575
579
bool tlmIsSet; // flag that enables / disables TLM frames
576
580
float TlmAdvPeriod; // number of minutes between adv frames
577
- Ticker tlmTicker;
581
+ mbed:: Ticker tlmTicker;
578
582
579
583
public:
580
584
/*
0 commit comments