nrf5/drivers/bluetooth: Updating bluetooth driver to initialize nrf_nvic_state_t struct during declaration of the global variable instead of explicit memset.
This commit is contained in:
parent
2f40c61c3e
commit
ed93392d87
@ -94,11 +94,9 @@ static mp_obj_t mp_gattc_char_data_observer;
|
|||||||
#if (BLUETOOTH_SD != 100) && (BLUETOOTH_SD != 110)
|
#if (BLUETOOTH_SD != 100) && (BLUETOOTH_SD != 110)
|
||||||
#include "nrf_nvic.h"
|
#include "nrf_nvic.h"
|
||||||
|
|
||||||
#if NRF51
|
#ifdef NRF52
|
||||||
nrf_nvic_state_t nrf_nvic_state;;
|
nrf_nvic_state_t nrf_nvic_state = {0};
|
||||||
#else
|
#endif // NRF52
|
||||||
nrf_nvic_state_t nrf_nvic_state;
|
|
||||||
#endif // NRF51
|
|
||||||
|
|
||||||
#endif // (BLUETOOTH_SD != 100)
|
#endif // (BLUETOOTH_SD != 100)
|
||||||
|
|
||||||
@ -115,10 +113,6 @@ uint32_t ble_drv_stack_enable(void) {
|
|||||||
m_adv_in_progress = false;
|
m_adv_in_progress = false;
|
||||||
m_tx_in_progress = false;
|
m_tx_in_progress = false;
|
||||||
|
|
||||||
#if (BLUETOOTH_SD != 100) && (BLUETOOTH_SD != 110)
|
|
||||||
memset(&nrf_nvic_state, 0, sizeof(nrf_nvic_state_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (BLUETOOTH_SD == 100) || (BLUETOOTH_SD == 110)
|
#if (BLUETOOTH_SD == 100) || (BLUETOOTH_SD == 110)
|
||||||
#if BLUETOOTH_LFCLK_RC
|
#if BLUETOOTH_LFCLK_RC
|
||||||
uint32_t err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION,
|
uint32_t err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user