Skip to content

Commit

Permalink
Merge pull request #5945 from EmergReanimator/stm_deinited_fix
Browse files Browse the repository at this point in the history
Fixed common_hal_busio_uart_deinited incorrect pin assignment check.
  • Loading branch information
ladyada authored Jan 29, 2022
2 parents 85cdb8c + 66cf66f commit 7ba23ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ports/stm/common-hal/busio/SPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void common_hal_busio_spi_never_reset(busio_spi_obj_t *self) {
}

bool common_hal_busio_spi_deinited(busio_spi_obj_t *self) {
return self->sck->pin == NULL;
return self->sck == NULL;
}

void common_hal_busio_spi_deinit(busio_spi_obj_t *self) {
Expand Down
2 changes: 1 addition & 1 deletion ports/stm/common-hal/busio/UART.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void common_hal_busio_uart_never_reset(busio_uart_obj_t *self) {
}

bool common_hal_busio_uart_deinited(busio_uart_obj_t *self) {
return self->tx->pin == NULL && self->rx->pin == NULL;
return self->tx == NULL && self->rx == NULL;
}

void common_hal_busio_uart_deinit(busio_uart_obj_t *self) {
Expand Down

0 comments on commit 7ba23ff

Please sign in to comment.