uart.h 423 B

123456789101112131415161718192021
  1. #ifndef UART_H
  2. #define UART_H
  3. #pragma once
  4. #include <furi.h>
  5. #include <furi_hal.h>
  6. #define RX_BUF_SIZE (1024)
  7. typedef struct Uart Uart;
  8. void uart_set_handle_rx_data_cb(
  9. Uart* uart,
  10. void (*handle_rx_data_cb)(uint8_t* buf, size_t len, void* context));
  11. void uart_tx(void* app, 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 */