uart.h 573 B

1234567891011121314151617181920
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. // Copyright (c) 2017-2022, Alex Taradov <alex@taradov.com>. All rights reserved.
  3. #ifndef _UART_H_
  4. #define _UART_H_
  5. /*- Includes ----------------------------------------------------------------*/
  6. #include <stdint.h>
  7. #include <stdbool.h>
  8. #include "usb_cdc.h"
  9. /*- Prototypes --------------------------------------------------------------*/
  10. void uart_init(usb_cdc_line_coding_t *line_coding);
  11. void uart_close(void);
  12. bool uart_write_byte(int byte);
  13. bool uart_read_byte(int *byte);
  14. void uart_set_break(bool brk);
  15. #endif // _UART_H_