Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
uart_arch.c File Reference

Handling of UART hardware for lpc21xx. More...

#include "mcu_periph/uart.h"
#include "armVIC.h"
+ Include dependency graph for uart_arch.c:

Go to the source code of this file.

Functions

static void uart_disable_interrupts (struct uart_periph *p)
 
static void uart_enable_interrupts (struct uart_periph *p)
 
static void uart_set_baudrate (struct uart_periph *p, uint32_t baud)
 
void uart_periph_set_baudrate (struct uart_periph *p, uint32_t baud)
 Set baudrate. More...
 
void uart_periph_set_bits_stop_parity (struct uart_periph *p, uint8_t bits, uint8_t stop, uint8_t parity)
 Set parity and stop bits. More...
 
void uart_put_byte (struct uart_periph *p, long fd, uint8_t data)
 Uart transmit implementation. More...
 
static void uart_ISR (struct uart_periph *p)
 

Detailed Description

Handling of UART hardware for lpc21xx.

Definition in file uart_arch.c.

Function Documentation

static void uart_disable_interrupts ( struct uart_periph p)
inlinestatic

Definition at line 34 of file uart_arch.c.

References uart_periph::reg_addr.

Referenced by uart_periph_set_baudrate().

+ Here is the caller graph for this function:

static void uart_enable_interrupts ( struct uart_periph p)
inlinestatic

Definition at line 43 of file uart_arch.c.

References uart_periph::reg_addr, and UIER_ERBFI.

Referenced by uart_periph_set_baudrate().

+ Here is the caller graph for this function:

void uart_periph_set_baudrate ( struct uart_periph p,
uint32_t  baud 
)

Set baudrate.

Definition at line 70 of file uart_arch.c.

References uart_disable_interrupts(), uart_enable_interrupts(), and uart_set_baudrate().

+ Here is the call graph for this function:

void uart_periph_set_bits_stop_parity ( struct uart_periph p,
uint8_t  bits,
uint8_t  stop,
uint8_t  parity 
)

Set parity and stop bits.

Definition at line 77 of file uart_arch.c.

void uart_put_byte ( struct uart_periph p,
long  fd,
uint8_t  data 
)

Uart transmit implementation.

Definition at line 83 of file uart_arch.c.

References disableIRQ(), uart_periph::reg_addr, restoreIRQ(), uart_periph::tx_buf, uart_periph::tx_extract_idx, uart_periph::tx_insert_idx, uart_periph::tx_running, UART_TX_BUFFER_SIZE, and UIER_ETBEI.

+ Here is the call graph for this function:

static void uart_set_baudrate ( struct uart_periph p,
uint32_t  baud 
)
inlinestatic

Definition at line 49 of file uart_arch.c.

References uart_periph::baudrate, PCLK, uart_periph::reg_addr, UART_8N1, UART_FIFO_8, and ULCR_DLAB_ENABLE.

Referenced by uart_periph_set_baudrate().

+ Here is the caller graph for this function: