Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed common_hal_busio_uart_deinited incorrect pin assignment check. #5945

Merged
merged 1 commit into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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