11#include "furi_hal_serial_types.h"
156#define FURI_HAL_SERIAL_DMA_BUFFER_SIZE (256u)
185 FuriHalSerialDirection direction);
198 FuriHalSerialDirection direction);
void furi_hal_serial_async_rx_start(FuriHalSerialHandle *handle, FuriHalSerialAsyncRxCallback callback, void *context, bool report_errors)
Start and sets Serial Receive callback.
Definition furi_hal_serial.c:766
void furi_hal_serial_dma_rx_start(FuriHalSerialHandle *handle, FuriHalSerialDmaRxCallback callback, void *context, bool report_errors)
Start and sets Serial event callback receive DMA.
Definition furi_hal_serial.c:890
void furi_hal_serial_disable_direction(FuriHalSerialHandle *handle, FuriHalSerialDirection direction)
Disable an input/output directon.
Definition furi_hal_serial.c:930
void(* FuriHalSerialDmaRxCallback)(FuriHalSerialHandle *handle, FuriHalSerialRxEvent event, size_t data_len, void *context)
Receive DMA callback.
Definition furi_hal_serial.h:168
size_t furi_hal_serial_dma_rx(FuriHalSerialHandle *handle, uint8_t *data, size_t len)
Get data Serial receive DMA.
Definition furi_hal_serial.c:843
void furi_hal_serial_enable_direction(FuriHalSerialHandle *handle, FuriHalSerialDirection direction)
Enable an input/output directon.
Definition furi_hal_serial.c:913
FuriHalSerialRxEvent
Serial RX events.
Definition furi_hal_serial.h:90
@ FuriHalSerialRxEventNoiseError
Noise Error: noise on the line detected.
Definition furi_hal_serial.h:94
@ FuriHalSerialRxEventOverrunError
Overrun Error: no space for received data.
Definition furi_hal_serial.h:95
@ FuriHalSerialRxEventData
Data: new data available.
Definition furi_hal_serial.h:91
@ FuriHalSerialRxEventIdle
Idle: bus idle detected.
Definition furi_hal_serial.h:92
@ FuriHalSerialRxEventFrameError
Framing Error: incorrect frame detected.
Definition furi_hal_serial.h:93
bool furi_hal_serial_async_rx_available(FuriHalSerialHandle *handle)
Check if there is data available for reading.
Definition furi_hal_serial.c:789
void furi_hal_serial_resume(FuriHalSerialHandle *handle)
Resume operation.
Definition furi_hal_serial.c:647
uint8_t furi_hal_serial_async_rx(FuriHalSerialHandle *handle)
Get data Serial receive.
Definition furi_hal_serial.c:800
void furi_hal_serial_deinit(FuriHalSerialHandle *handle)
De-initialize Serial.
Definition furi_hal_serial.c:608
void furi_hal_serial_dma_rx_stop(FuriHalSerialHandle *handle)
Stop Serial receive DMA.
Definition furi_hal_serial.c:907
void furi_hal_serial_set_br(FuriHalSerialHandle *handle, uint32_t baud)
Changes baud rate.
Definition furi_hal_serial.c:579
bool furi_hal_serial_is_baud_rate_supported(FuriHalSerialHandle *handle, uint32_t baud)
Determine whether a certain baud rate is supported.
Definition furi_hal_serial.c:507
void furi_hal_serial_tx_wait_complete(FuriHalSerialHandle *handle)
Wait until transmission is completed.
Definition furi_hal_serial.c:689
void furi_hal_serial_suspend(FuriHalSerialHandle *handle)
Suspend operation.
Definition furi_hal_serial.c:637
const GpioPin * furi_hal_serial_get_gpio_pin(FuriHalSerialHandle *handle, FuriHalSerialDirection direction)
Get the GPIO pin associated with a serial.
Definition furi_hal_serial.c:946
void furi_hal_serial_tx(FuriHalSerialHandle *handle, const uint8_t *buffer, size_t buffer_size)
Transmits data in semi-blocking mode.
Definition furi_hal_serial.c:659
void(* FuriHalSerialAsyncRxCallback)(FuriHalSerialHandle *handle, FuriHalSerialRxEvent event, void *context)
Receive callback.
Definition furi_hal_serial.h:106
void furi_hal_serial_init(FuriHalSerialHandle *handle, uint32_t baud)
Initialize Serial.
Definition furi_hal_serial.c:498
void furi_hal_serial_async_rx_stop(FuriHalSerialHandle *handle)
Stop Serial Receive.
Definition furi_hal_serial.c:783
Definition furi_hal_serial_types_i.h:5
Gpio structure.
Definition furi_hal_gpio.h:161