Corrected issue with BLE not working on nrf52840
This commit is contained in:
parent
6357093334
commit
ed6cc64c49
@ -104,8 +104,12 @@ void common_hal_busio_spi_never_reset(busio_spi_obj_t *self) {
|
|||||||
never_reset[i] = true;
|
never_reset[i] = true;
|
||||||
|
|
||||||
never_reset_pin_number(self->clock_pin_number);
|
never_reset_pin_number(self->clock_pin_number);
|
||||||
|
if ( self->MOSI_pin_number != NO_PIN) {
|
||||||
never_reset_pin_number(self->MOSI_pin_number);
|
never_reset_pin_number(self->MOSI_pin_number);
|
||||||
|
}
|
||||||
|
if ( self->MISO_pin_number != NO_PIN) {
|
||||||
never_reset_pin_number(self->MISO_pin_number);
|
never_reset_pin_number(self->MISO_pin_number);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -180,7 +184,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self, const mcu_pin_obj_t *
|
|||||||
|
|
||||||
if (miso != NULL) {
|
if (miso != NULL) {
|
||||||
config.miso_pin = miso->number;
|
config.miso_pin = miso->number;
|
||||||
self->MISO_pin_number = mosi->number;
|
self->MISO_pin_number = miso->number;
|
||||||
claim_pin(miso);
|
claim_pin(miso);
|
||||||
} else {
|
} else {
|
||||||
self->MISO_pin_number = NO_PIN;
|
self->MISO_pin_number = NO_PIN;
|
||||||
@ -204,8 +208,12 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) {
|
|||||||
nrfx_spim_uninit(&self->spim_peripheral->spim);
|
nrfx_spim_uninit(&self->spim_peripheral->spim);
|
||||||
|
|
||||||
reset_pin_number(self->clock_pin_number);
|
reset_pin_number(self->clock_pin_number);
|
||||||
|
if ( self->MOSI_pin_number != NO_PIN) {
|
||||||
reset_pin_number(self->MOSI_pin_number);
|
reset_pin_number(self->MOSI_pin_number);
|
||||||
|
}
|
||||||
|
if ( self->MISO_pin_number != NO_PIN) {
|
||||||
reset_pin_number(self->MISO_pin_number);
|
reset_pin_number(self->MISO_pin_number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool common_hal_busio_spi_configure(busio_spi_obj_t *self, uint32_t baudrate, uint8_t polarity, uint8_t phase, uint8_t bits) {
|
bool common_hal_busio_spi_configure(busio_spi_obj_t *self, uint32_t baudrate, uint8_t polarity, uint8_t phase, uint8_t bits) {
|
||||||
|
Loading…
Reference in New Issue
Block a user