add BLEAdvertising

This commit is contained in:
hathach committed 2017-03-04 14:27:24 +07:00
1 parent 4905c94e9a
commit 9f3e2955cb
10 files changed
+364 -280

No files matched your search

+3 -3
View File
@@ -69,13 +69,13 @@ err_t BLECentral::startScanning(uint16_t timeout)
{
_scan_param.timeout = timeout;
VERIFY_STATUS( sd_ble_gap_scan_start(&_scan_param) );
Bluefruit._startConnLed(); // start blinking
Bluefruit.startConnLed(); // start blinking
return ERROR_NONE;
}
err_t BLECentral::stopScanning(void)
{
Bluefruit._stopConnLed(); // stop blinking
Bluefruit.stopConnLed(); // stop blinking
return sd_ble_gap_scan_stop();
}
@@ -210,7 +210,7 @@ void BLECentral::_event_handler(ble_evt_t* evt)
if (para->role == BLE_GAP_ROLE_CENTRAL)
{
Bluefruit._stopConnLed();
Bluefruit.stopConnLed();
if (Bluefruit._led_conn) ledOn(LED_CONN);
_conn_hdl = evt->evt.gap_evt.conn_handle;