esp_flasher_uart.h 615 B

123456789101112131415161718192021
  1. #pragma once
  2. #include "furi_hal.h"
  3. #include <xtreme.h>
  4. #define UART_CH \
  5. (xtreme_settings.uart_esp_channel == UARTDefault ? FuriHalUartIdUSART1 : FuriHalUartIdLPUART1)
  6. #define BAUDRATE (115200)
  7. #define FAST_BAUDRATE (921600)
  8. #define RX_BUF_SIZE (2048)
  9. typedef struct EspFlasherUart EspFlasherUart;
  10. void esp_flasher_uart_set_handle_rx_data_cb(
  11. EspFlasherUart* uart,
  12. void (*handle_rx_data_cb)(uint8_t* buf, size_t len, void* context));
  13. void esp_flasher_uart_tx(uint8_t* data, size_t len);
  14. EspFlasherUart* esp_flasher_usart_init(EspFlasherApp* app);
  15. void esp_flasher_uart_free(EspFlasherUart* uart);