File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -411,17 +411,19 @@ void assert_nrf_callback (uint16_t line_num, uint8_t const * p_file_name)
411
411
// Process BLE event from SD
412
412
uint32_t proc_ble (void )
413
413
{
414
- __ALIGN (4 ) uint8_t ev_buf [ BLE_EVT_LEN_MAX (BLEGATT_ATT_MTU_MAX ) ] = { 0 } ;
414
+ __ALIGN (4 ) uint8_t ev_buf [ BLE_EVT_LEN_MAX (BLEGATT_ATT_MTU_MAX ) ];
415
415
uint16_t ev_len = BLE_EVT_LEN_MAX (BLEGATT_ATT_MTU_MAX );
416
416
417
+ // Init header
418
+ ble_evt_t * evt = (ble_evt_t * ) ev_buf ;
419
+ evt -> header .evt_id = 0 ;
420
+
417
421
// Get BLE Event
418
422
uint32_t err = sd_ble_evt_get (ev_buf , & ev_len );
419
423
420
424
// Handle valid event, ignore error
421
425
if ( NRF_SUCCESS == err )
422
426
{
423
- ble_evt_t * evt = (ble_evt_t * ) ev_buf ;
424
-
425
427
switch (evt -> header .evt_id )
426
428
{
427
429
case BLE_GAP_EVT_CONNECTED :
You can’t perform that action at this time.
0 commit comments