esp_flasher_uart.h 605 B

12345678910111213141516171819
  1. #pragma once
  2. #include "furi_hal.h"
  3. #define UART_CH (FuriHalSerialIdUsart)
  4. #define BAUDRATE (115200)
  5. #define FAST_BAUDRATE (921600)
  6. #define RX_BUF_SIZE (2048)
  7. typedef struct EspFlasherUart EspFlasherUart;
  8. void esp_flasher_uart_set_handle_rx_data_cb(
  9. EspFlasherUart* uart,
  10. void (*handle_rx_data_cb)(uint8_t* buf, size_t len, void* context));
  11. void esp_flasher_uart_tx(EspFlasherUart* uart, uint8_t* data, size_t len);
  12. void esp_flasher_uart_set_br(EspFlasherUart* uart, uint32_t baud);
  13. EspFlasherUart* esp_flasher_usart_init(EspFlasherApp* app);
  14. void esp_flasher_uart_free(EspFlasherUart* uart);