mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-23 11:13:09 +00:00
732b9546fc
* [FL-1984] USB-UART fixes * FuriHal: fix SOF wait on CDC0 * FuriHal: fixed stuck in UART IRQ with ORE event Co-authored-by: あく <alleteam@gmail.com>
29 lines
576 B
C
29 lines
576 B
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include "furi-hal-console.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum {
|
|
FuriHalUartIdUSART1,
|
|
FuriHalUartIdLPUART1,
|
|
} FuriHalUartId;
|
|
|
|
|
|
void furi_hal_uart_init(FuriHalUartId ch, uint32_t baud);
|
|
|
|
void furi_hal_uart_deinit(FuriHalUartId ch);
|
|
|
|
void furi_hal_uart_set_br(FuriHalUartId ch, uint32_t baud);
|
|
|
|
void furi_hal_uart_tx(FuriHalUartId ch, uint8_t* buffer, size_t buffer_size);
|
|
|
|
void furi_hal_uart_set_irq_cb(FuriHalUartId ch, void (*cb)(UartIrqEvent ev, uint8_t data));
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|