clean up
This commit is contained in:
1 parent
0302d88a7a
commit
fa4dcc0255
5 files changed
+25
-19
No files matched your search
+12
-4
@@ -4,12 +4,20 @@
|
||||
|
||||
### BLE
|
||||
|
||||
- Change Bluefruit.peerAddr() to Bluefruit.getPeerAddr()
|
||||
- Rename Bluefruit.peerAddr() to Bluefruit.getPeerAddr()
|
||||
- Change BLEClientUart's rx callback
|
||||
- Add connection handle to Bluefruit's connect and disconnect callback prototype
|
||||
- BLEAdvertising enhancement
|
||||
- Seperated BLEAdvertisingData and BLEAdvertising
|
||||
- Add setTimeout(), setType()
|
||||
|
||||
BLEAdvertising enhancement
|
||||
|
||||
- Separate BLEAdvertisingData and BLEAdvertising
|
||||
- Add setStopCallback() support
|
||||
- Add option to only advertising for a specific time (in multiple of timeout) with start(stop_sec)
|
||||
- Default timeout = 30 second, fast = 20 ms, slow = 152.5 ms
|
||||
|
||||
BLEGAP support multiple connections
|
||||
|
||||
- getRole()
|
||||
|
||||
## 0.6.5
|
||||
|
||||
|
||||
@@ -58,8 +58,6 @@ void setupAdv(void)
|
||||
// earlier in this example
|
||||
Bluefruit.Advertising.setBeacon(beacon);
|
||||
|
||||
// char* adv = Bluefruit.Advertising.getData();
|
||||
|
||||
// There is no room left for 'Name' in the advertising packet
|
||||
// Use the optinal secondary Scan Response packet for 'Name' instead
|
||||
Bluefruit.ScanResponse.addName();
|
||||
|
||||
@@ -152,9 +152,9 @@ uint8_t BLEAdvertisingData::count(void)
|
||||
return _count;
|
||||
}
|
||||
|
||||
char* BLEAdvertisingData::getData(void)
|
||||
uint8_t* BLEAdvertisingData::getData(void)
|
||||
{
|
||||
return (char*) _data;
|
||||
return _data;
|
||||
}
|
||||
|
||||
bool BLEAdvertisingData::setData(uint8_t const * data, uint8_t count)
|
||||
@@ -243,7 +243,7 @@ bool BLEAdvertising::_start(uint16_t interval)
|
||||
bool BLEAdvertising::start(uint32_t stop_sec)
|
||||
{
|
||||
// Configure Data
|
||||
VERIFY_STATUS( sd_ble_gap_adv_data_set(_data, _count, Bluefruit.ScanResponse._data, Bluefruit.ScanResponse._count), false );
|
||||
VERIFY_STATUS( sd_ble_gap_adv_data_set(_data, _count, Bluefruit.ScanResponse.getData(), Bluefruit.ScanResponse.count()), false );
|
||||
VERIFY( _start(_fast_interval) );
|
||||
|
||||
_started_sec = 0; // reset established time
|
||||
|
||||
@@ -65,10 +65,10 @@ public:
|
||||
bool addService(BLEClientService& service);
|
||||
|
||||
// Custom API
|
||||
uint8_t count(void);
|
||||
char* getData(void);
|
||||
bool setData(const uint8_t* data, uint8_t count);
|
||||
void clearData(void);
|
||||
uint8_t count(void);
|
||||
uint8_t* getData(void);
|
||||
bool setData(const uint8_t* data, uint8_t count);
|
||||
void clearData(void);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -93,13 +93,13 @@ class AdafruitBluefruit
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Lower Level Classes (Bluefruit.Advertising.*, etc.)
|
||||
*------------------------------------------------------------------*/
|
||||
BLEAdvertising Advertising;
|
||||
BLEAdvertising ScanResponse;
|
||||
BLECentral Central;
|
||||
BLEDiscovery Discovery;
|
||||
BLEAdvertising Advertising;
|
||||
BLEAdvertisingData ScanResponse;
|
||||
BLECentral Central;
|
||||
BLEDiscovery Discovery;
|
||||
|
||||
BLEGap Gap;
|
||||
BLEGatt Gatt;
|
||||
BLEGap Gap;
|
||||
BLEGatt Gatt;
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* General Purpose Functions
|
||||
|
||||
Reference in new issue
Block a user