STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
← STM32duino documentation
Loading...
Searching...
No Matches
serial_s Struct Reference

Serial (U(S)ART) object. More...

#include <uart.h>

Public Attributes

USART_TypeDef * uart
 U(S)ART peripheral instance.
 
UART_HandleTypeDef handle
 HAL UART handle.
 
void(* rx_callback )(serial_t *)
 Called when a byte has been received.
 
int(* tx_callback )(serial_t *)
 Called when a transmission is completed.
 
PinName pin_tx
 TX pin.
 
PinName pin_rx
 RX pin, NC for half-duplex mode.
 
PinName pin_rts
 RTS pin, NC if not used.
 
PinName pin_cts
 CTS pin, NC if not used.
 
IRQn_Type irq
 U(S)ART IRQ number.
 
uint8_t index
 Index of the peripheral in the internal handlers table.
 
uint8_t recv
 Last received byte.
 
uint8_t * rx_buff
 RX ring buffer.
 
uint8_t * tx_buff
 TX ring buffer.
 
uint16_t rx_tail
 RX buffer tail index.
 
uint16_t tx_head
 TX buffer head index.
 
volatile uint16_t rx_head
 RX buffer head index.
 
volatile uint16_t tx_tail
 TX buffer tail index.
 
size_t tx_size
 Number of bytes of the transfer in progress.
 

Detailed Description

Serial (U(S)ART) object.


The documentation for this struct was generated from the following file: