Skip to content

Commit 3984c86

Browse files
committed
fix some warnings
remove beacon blocking wait for Serial connection
1 parent 4d703b6 commit 3984c86

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

cores/nRF5/freertos/portable/CMSIS/nrf52/port_cmsis_systick.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
194194
(void) sd_softdevice_is_enabled(&sd_en);
195195
if (sd_en) // (softdevice_handler_is_enabled())
196196
{
197-
uint32_t err_code = sd_app_evt_wait();
198-
//APP_ERROR_CHECK(err_code);
197+
(void) sd_app_evt_wait();
199198
}
200199
else
201200
#endif

libraries/Bluefruit52Lib/examples/Peripheral/beacon/beacon.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ BLEBeacon beacon(beaconUuid, 0x0000, 0x0000, -54);
3434
void setup()
3535
{
3636
Serial.begin(115200);
37-
while ( !Serial ) delay(10); // for nrf52840 with native usb
37+
38+
// Uncomment to blocking wait for Serial connection
39+
// while ( !Serial ) delay(10);
3840

3941
Serial.println("Bluefruit52 Beacon Example");
4042
Serial.println("--------------------------\n");

libraries/Bluefruit52Lib/src/BLEPeriph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void BLEPeriph::setDisconnectCallback( ble_disconnect_callback_t fp )
126126
void BLEPeriph::_eventHandler(ble_evt_t* evt)
127127
{
128128
uint16_t const conn_hdl = evt->evt.common_evt.conn_handle;
129-
BLEConnection* conn = Bluefruit.Connection(conn_hdl);
129+
// BLEConnection* conn = Bluefruit.Connection(conn_hdl);
130130

131131
switch ( evt->header.evt_id )
132132
{

libraries/Bluefruit52Lib/src/BLESecurity.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ void BLESecurity::_eventHandler(ble_evt_t* evt)
374374
// - load key and return if bonded previously.
375375
// - Else return NULL --> Initiate key exchange
376376
ble_gap_evt_sec_info_request_t* sec_info = (ble_gap_evt_sec_info_request_t*) &evt->evt.gap_evt.params.sec_info_request;
377+
(void) sec_info;
377378

378379
LOG_LV2("PAIR", "Address: ID = %d, Type = 0x%02X, %02X:%02X:%02X:%02X:%02X:%02X",
379380
sec_info->peer_addr.addr_id_peer, sec_info->peer_addr.addr_type,
@@ -395,6 +396,7 @@ void BLESecurity::_eventHandler(ble_evt_t* evt)
395396
case BLE_GAP_EVT_CONN_SEC_UPDATE:
396397
{
397398
const ble_gap_conn_sec_t* conn_sec = &evt->evt.gap_evt.params.conn_sec_update.conn_sec;
399+
(void) conn_sec;
398400
LOG_LV2("PAIR", "Security Mode = %d, Level = %d", conn_sec->sec_mode.sm, conn_sec->sec_mode.lv);
399401

400402
if ( _secured_cb )

libraries/Bluefruit52Lib/src/utility/bonding.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ void bond_init(void)
9797
*------------------------------------------------------------------*/
9898
static void bond_save_keys_dfr (uint8_t role, uint16_t conn_hdl, bond_keys_t const * bkeys)
9999
{
100-
uint16_t const ediv = (role == BLE_GAP_ROLE_PERIPH) ? bkeys->own_enc.master_id.ediv : bkeys->peer_enc.master_id.ediv;
101100
uint8_t const * mac = bkeys->peer_id.id_addr_info.addr;
102101

103102
// Bond store keys using peer mac address e.g 1a2b3c4d5e6f

0 commit comments

Comments
 (0)