uart.h 438 B

123456789101112131415161718192021
  1. #ifndef UART_H
  2. #define UART_H
  3. #pragma once
  4. #include "furi_hal.h"
  5. #define RX_BUF_SIZE (1024)
  6. typedef struct Uart Uart;
  7. void uart_set_handle_rx_data_cb(
  8. Uart* uart,
  9. void (*handle_rx_data_cb)(uint8_t* buf, size_t len, void* context));
  10. void uart_tx(uint8_t* data, size_t len);
  11. void lp_uart_tx(uint8_t* data, size_t len);
  12. Uart* usart_init(void* app);
  13. Uart* lp_uart_init(void* app);
  14. void uart_free(Uart* uart);
  15. #endif /* UART_H */