BSPACM  20150113
Board Support Package for ARM Cortex-M Microcontrollers
Data Fields
sBSPACMperiphUARTstate Struct Reference

#include <bspacm/periph/uart.h>

Data Fields

void *const uart
 
union {
   uint32_t   u32
 
   const void *   ptr
 
devcfg
 
const struct sBSPACMperiphUARToperations *const ops
 
struct sFIFO *const tx_fifo_ni_
 
struct sFIFO *const rx_fifo_ni_
 
unsigned int flags
 
unsigned int peripheral_state_ni
 
unsigned int rx_count
 
unsigned int tx_count
 
uint16_t rx_dropped_errors
 
uint8_t rx_frame_errors
 
uint8_t rx_parity_errors
 
uint8_t rx_break_errors
 
uint8_t rx_overrun_errors
 
uint8_t tx_state_
 

Detailed Description

State associated with a UART device.

An instance of this structure is uniquely associated with each UART peripheral that is supported by an application.

Field Documentation

union { ... } sBSPACMperiphUARTstate::devcfg

A field that contains device-specific auxiliary information that cannot be inferred from the base address. For example, an identifier for the module clock.

unsigned int sBSPACMperiphUARTstate::flags

Flags controlling the behavior of the UART at the BSPACM layer.

const struct sBSPACMperiphUARToperations* const sBSPACMperiphUARTstate::ops

Pointer to the operations table that implements UART functionality for this device. Users mostly won't need to touch this.

unsigned int sBSPACMperiphUARTstate::peripheral_state_ni

State managed by the peripheral layer. For example, this may be used to record information gathered in an interrupt handler for use by functions outside the interrupt handler.

const void* sBSPACMperiphUARTstate::ptr

null, or a pointer to an internal structure

uint8_t sBSPACMperiphUARTstate::rx_break_errors

The number of break conditions ("errors") detected by hardware

unsigned int sBSPACMperiphUARTstate::rx_count

The total number of characters received at the hardware interface. This includes characters that were dropped due to lack of space in the software fifo (rx_dropped_errors).

uint16_t sBSPACMperiphUARTstate::rx_dropped_errors

The number of times a newly received character at the hardware interface caused a previously received character to be dropped from the software FIFO.

struct sFIFO* const sBSPACMperiphUARTstate::rx_fifo_ni_

Pointer to a device-specific software FIFO to hold data that has been received but not accepted by the application.

Note
The structure referenced by this field is mutated by both ISRs and driver code. Interrupts must be disabled when accessing this field unless the UART is turned off.
While you can transmit data without a tx_fifo_ni_, you cannot receive data without an rx_fifo_ni_.
uint8_t sBSPACMperiphUARTstate::rx_frame_errors

The number of framing errors detected by hardware

uint8_t sBSPACMperiphUARTstate::rx_overrun_errors

The number of overrun errors detected by hardware

uint8_t sBSPACMperiphUARTstate::rx_parity_errors

The number of parity errors detected by hardware

unsigned int sBSPACMperiphUARTstate::tx_count

The total number of characters transmitted over the hardware interface.

struct sFIFO* const sBSPACMperiphUARTstate::tx_fifo_ni_

Pointer to a device-specific software FIFO to hold data to be transmitted.

Note
The structure referenced by this field is mutated by both ISRs and driver code. Interrupts must be disabled when accessing this field unless the UART is turned off. State read from the structure should be synchronized with state read from tx_state_.
uint8_t sBSPACMperiphUARTstate::tx_state_

A stage in an internal state machine used to support BSPACM_PERIPH_UART_FLAG_ONLCR or other driver-layer transmitted data translation.

Note
This field is mutated only by driver code, so it may be read without disabling interrupts. However, its information combines with state read from tx_fifo_ni_, so interrupts must disabled when mutating this value, or accessing both fields to determine fifo state.
This field is owned by the BSPACM uart layer; vendor implementation layers can't use it. See peripheral_state_ni.
uint32_t sBSPACMperiphUARTstate::u32

some integral value

void* const sBSPACMperiphUARTstate::uart

Reference to the device. This is a pointer to the peripheral-specific base CMSIS device structure; interpreted as a uint32_t is is the peripheral base address.


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