RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
arm-pl011.h File Reference

ARM PL011 Support Package. More...

#include <rtems/termiostypes.h>
#include <dev/serial/arm-pl011-regs.h>
#include <bspopts.h>

Go to the source code of this file.

Data Structures

struct  arm_pl011_uart
 
struct  arm_pl011_context
 

Functions

bool arm_pl011_probe (rtems_termios_device_context *base)
 Initialize pl011 registers.
 
void arm_pl011_write_polled (rtems_termios_device_context *base, char c)
 Write a char using polling mode.
 
int arm_pl011_read_polled (rtems_termios_device_context *base)
 Read a char using polling mode.
 
volatile arm_pl011_uartarm_pl011_get_regs (rtems_termios_device_context *base)
 Get register base address.
 
int arm_pl011_compute_baudrate_params (uint32_t *ibrd, uint32_t *fbrd, const uint32_t baudrate, const uint32_t clock, const unsigned short max_error)
 Compute baudrate params.
 

Variables

const rtems_termios_device_handler arm_pl011_fns
 

Detailed Description

ARM PL011 Support Package.

Function Documentation

◆ arm_pl011_compute_baudrate_params()

int arm_pl011_compute_baudrate_params ( uint32_t *  ibrd,
uint32_t *  fbrd,
const uint32_t  baudrate,
const uint32_t  clock,
const unsigned short  max_error 
)

Compute baudrate params.

Parameters
ibrdThe integer part of the baud rate divisor value.
fbrdThe fractional part of the baud rate divisor value.
baudrateTermios device context.
clockThe UART reference clock frequency.
max_errorMaximum error.
Return values
0Success.
1The error is too large.
2ibrd is invalid.

◆ arm_pl011_get_regs()

volatile arm_pl011_uart * arm_pl011_get_regs ( rtems_termios_device_context base)

Get register base address.

Parameters
baseTermios device context.
Return values
Registerbase address.

◆ arm_pl011_probe()

bool arm_pl011_probe ( rtems_termios_device_context base)

Initialize pl011 registers.

Parameters
baseTermios device context.
Return values
trueSuccessfully initialized pl011 registers.

◆ arm_pl011_read_polled()

int arm_pl011_read_polled ( rtems_termios_device_context base)

Read a char using polling mode.

Parameters
baseTermios device context.
Return values
Characterread.
-1rxfifo is empty.

◆ arm_pl011_write_polled()

void arm_pl011_write_polled ( rtems_termios_device_context base,
char  c 
)

Write a char using polling mode.

Parameters
baseTermios device context.
cCharacter to be written.