Skip to content

Commit 14b7080

Browse files
committed
de-init check
1 parent e076f14 commit 14b7080

File tree

1 file changed

+2
-0
lines changed
  • ports/stm32f4/common-hal/busio

1 file changed

+2
-0
lines changed

ports/stm32f4/common-hal/busio/UART.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ bool common_hal_busio_uart_deinited(busio_uart_obj_t *self) {
312312
}
313313

314314
void common_hal_busio_uart_deinit(busio_uart_obj_t *self) {
315+
if(common_hal_busio_uart_deinited(self)) return;
316+
315317
reset_pin_number(self->tx->pin->port,self->tx->pin->number);
316318
reset_pin_number(self->rx->pin->port,self->rx->pin->number);
317319
self->tx = mp_const_none;

0 commit comments

Comments
 (0)