openMMC
Open Source Modular MMC for AMCs
Loading...
Searching...
No Matches
lpc17_uart.h File Reference

LPC17xx UART interface definitions. More...

#include "string.h"
#include "stdio.h"
Include dependency graph for lpc17_uart.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lpc_uart_cfg
 

Macros

#define uart_set_baud(id, baud)   Chip_UART_SetBaud( usart_cfg[id].ptr, baud )
 
#define uart_config_data(id, cfg)   Chip_UART_ConfigData( usart_cfg[id].ptr, cfg )
 
#define uart_tx_enable(id)   Chip_UART_TXEnable( usart_cfg[id].ptr )
 
#define uart_tx_disable(id)   Chip_UART_TXDisable( usart_cfg[id].ptr )
 
#define uart_int_enable(id, mask)   Chip_UART_IntEnable( usart_cfg[id].ptr, mask )
 
#define uart_int_disable(id, mask)   Chip_UART_IntDisable( usart_cfg[id].ptr, mask )
 
#define uart_send_char(id, ch)   Chip_UART_SendByte( usart_cfg[id].ptr, ch )
 
#define uart_read_char(id)   Chip_UART_ReadByte( usart_cfg[id].ptr )
 
#define uart_send(id, msg, len)   Chip_UART_SendBlocking( usart_cfg[id].ptr, msg, len )
 
#define uart_read(id, buf, len)   Chip_UART_ReadBlocking( usart_cfg[id].ptr, buf, len )
 

Typedefs

typedef struct lpc_uart_cfg lpc_uart_cfg_t
 

Functions

void uart_init (uint8_t id)
 

Variables

const lpc_uart_cfg_t usart_cfg [4]
 

Detailed Description

LPC17xx UART interface definitions.

Author
Henrique Silva henri.nosp@m.que..nosp@m.silva.nosp@m.@lnl.nosp@m.s.br, LNLS

Macro Definition Documentation

◆ uart_config_data

#define uart_config_data ( id,
cfg )   Chip_UART_ConfigData( usart_cfg[id].ptr, cfg )

◆ uart_int_disable

#define uart_int_disable ( id,
mask )   Chip_UART_IntDisable( usart_cfg[id].ptr, mask )

◆ uart_int_enable

#define uart_int_enable ( id,
mask )   Chip_UART_IntEnable( usart_cfg[id].ptr, mask )

◆ uart_read

#define uart_read ( id,
buf,
len )   Chip_UART_ReadBlocking( usart_cfg[id].ptr, buf, len )

◆ uart_read_char

#define uart_read_char ( id)    Chip_UART_ReadByte( usart_cfg[id].ptr )

◆ uart_send

#define uart_send ( id,
msg,
len )   Chip_UART_SendBlocking( usart_cfg[id].ptr, msg, len )

◆ uart_send_char

#define uart_send_char ( id,
ch )   Chip_UART_SendByte( usart_cfg[id].ptr, ch )

◆ uart_set_baud

#define uart_set_baud ( id,
baud )   Chip_UART_SetBaud( usart_cfg[id].ptr, baud )

◆ uart_tx_disable

#define uart_tx_disable ( id)    Chip_UART_TXDisable( usart_cfg[id].ptr )

◆ uart_tx_enable

#define uart_tx_enable ( id)    Chip_UART_TXEnable( usart_cfg[id].ptr )

Typedef Documentation

◆ lpc_uart_cfg_t

typedef struct lpc_uart_cfg lpc_uart_cfg_t

Function Documentation

◆ uart_init()

void uart_init ( uint8_t id)

Variable Documentation

◆ usart_cfg

const lpc_uart_cfg_t usart_cfg[4]
extern