uart.h 430 B

1234567891011121314151617181920
  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(Uart* uart, void (*handle_rx_data_cb)(uint8_t* buf, size_t len, void* context));
  8. void uart_tx(uint8_t* data, size_t len);
  9. void lp_uart_tx(uint8_t* data, size_t len);
  10. Uart* usart_init(void* app);
  11. Uart* lp_uart_init(void* app);
  12. void uart_free(Uart* uart);
  13. #endif /* UART_H */