Private apis – Altera Embedded Peripherals IP User Manual

Page 99

Advertising
background image

Parameters:

dev - The UART device
ptr – destination address
len – maximum length of the data
flags – for indicating blocking/non-blocking access

for single/multi threaded

Returns:

Number of bytes read

Description:

Read data to the UART receiver buffer. UART

required to be in a known settings prior executing

this function

Table 9-16: alt_16550_uart_write

Prototype:

alt_u32 alt_16550_uart_write(altera_16550_uart_

dev* dev, const char * ptr, alt_u16 flags, int len);

Include:

<altera_16550_uart.h>

Parameters:

dev - The UART device
ptr – source address
len – maximum length of the data
flags – for indicating blocking/non-blocking access

for single/multi threaded

Returns:

Number of bytes written

Description:

Writes data to the UART transmitter buffer. UART

required to be in a known settings prior executing

this function

Table 9-17: alt_16550_uart_config

Prototype:

alt_u32 alt_16550_uart_config(altera_16550_uart_

dev* dev, UartConfig *config);

Include:

dev - The UART device

Parameters:

config – UART configuration structure to configure

UART (refer to UART device structure

Returns:

Return 0 for success otherwise fail

Description:

Configure UART per user input before initiating

read or Write

Private APIs

Table 9-18: alt_16550_irq

Prototype:

static void altera_16550_uart_irq (void* context)

UG-01085

2014.24.07

Private APIs

9-13

16550 UART

Altera Corporation

Send Feedback

Advertising