summaryrefslogtreecommitdiffstatshomepage
path: root/teensy/uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'teensy/uart.c')
-rw-r--r--teensy/uart.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/teensy/uart.c b/teensy/uart.c
index 48149c795d..4751e3293f 100644
--- a/teensy/uart.c
+++ b/teensy/uart.c
@@ -177,35 +177,6 @@ bool uart_init(pyb_uart_obj_t *uart_obj, uint32_t baudrate) {
return uart_init2(uart_obj);
}
-void uart_deinit(pyb_uart_obj_t *uart_obj) {
-#if 0
- uart_obj->is_enabled = false;
- UART_HandleTypeDef *uart = &uart_obj->uart;
- HAL_UART_DeInit(uart);
- if (uart->Instance == USART1) {
- __USART1_FORCE_RESET();
- __USART1_RELEASE_RESET();
- __USART1_CLK_DISABLE();
- } else if (uart->Instance == USART2) {
- __USART2_FORCE_RESET();
- __USART2_RELEASE_RESET();
- __USART2_CLK_DISABLE();
- } else if (uart->Instance == USART3) {
- __USART3_FORCE_RESET();
- __USART3_RELEASE_RESET();
- __USART3_CLK_DISABLE();
- } else if (uart->Instance == UART4) {
- __UART4_FORCE_RESET();
- __UART4_RELEASE_RESET();
- __UART4_CLK_DISABLE();
- } else if (uart->Instance == USART6) {
- __USART6_FORCE_RESET();
- __USART6_RELEASE_RESET();
- __USART6_CLK_DISABLE();
- }
-#endif
-}
-
bool uart_rx_any(pyb_uart_obj_t *uart_obj) {
#if 0
return __HAL_UART_GET_FLAG(&uart_obj->uart, UART_FLAG_RXNE);
@@ -390,8 +361,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_uart_init_obj, 1, pyb_uart_init);
/// \method deinit()
/// Turn off the UART bus.
STATIC mp_obj_t pyb_uart_deinit(mp_obj_t self_in) {
- pyb_uart_obj_t *self = self_in;
- uart_deinit(self);
+ //pyb_uart_obj_t *self = self_in;
+ // TODO
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_uart_deinit_obj, pyb_uart_deinit);