mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-16 09:12:39 +03: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>
39 lines
697 B
C
39 lines
697 B
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum {
|
|
UartIrqEventRXNE,
|
|
UartIrqEventIDLE,
|
|
//TODO: more events
|
|
} UartIrqEvent;
|
|
|
|
void furi_hal_console_init();
|
|
|
|
void furi_hal_console_enable();
|
|
|
|
void furi_hal_console_disable();
|
|
|
|
void furi_hal_console_tx(const uint8_t* buffer, size_t buffer_size);
|
|
|
|
void furi_hal_console_tx_with_new_line(const uint8_t* buffer, size_t buffer_size);
|
|
|
|
/**
|
|
* Printf-like plain uart interface
|
|
* @warning Will not work in ISR context
|
|
* @param format
|
|
* @param ...
|
|
*/
|
|
void furi_hal_console_printf(const char format[], ...);
|
|
|
|
void furi_hal_console_puts(const char* data);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|