| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
LPC8xx USART example using UART ROM API functions
Peripheral examples

## Detailed Description

Example description
The UART_ROM example demonstrates using the USART API ROM functions.

Special connection requirements
There are no special connection requirements for this example.

Build procedures:
LPC8xx example quickstart for IAR EWARM
LPC8xx example quickstart for Keil uVision4
LPC8xx example quickstart for Code Red Xpresso

Supported boards and board setup:
NXP Xpresso LPC812 board

Submitting LPCOpen issues:
Community support for LPCOpen

## Macros
#define | APP_UART_RECEIVE_BUGGER_SIZE 9

## Functions
static void | rx_callback (uint32_t err_code, uint32_t n)
static void | tx_callback (uint32_t err_code, uint32_t n)
static void | App_error_routine ()
static void | App_Polling_Send (const char *send_data, uint32_t lenght)
static void | App_Polling_Receive (char *receive_buffer, uint32_t lenght)
static void | App_Interrupt_Send (const char *send_data, uint32_t lenght)
static void | App_UART_API_Init ()
void | UART0_IRQHandler (void)
| UART0 ISR handler.
int | main (void)
| Main Function.

## Variables
static UART_HANDLE_T * | uart
static uint32_t | umem [UART_ROM_MEM_SIZE]
static const char | welcome [] = "LPC812 XPresso Board USART API ROM Example.\0"
static const char | Polling_info [] = "UART Polling mode demo! Please type 'hello NXP' to continue.\0"
static const char | Interrupt_info []
static const char | terminate [] = "\r\nDemo is terminated. Thanks for using.\0"
static char | recv_buf [APP_UART_RECEIVE_BUGGER_SIZE]
static volatile uint8_t | byte
static volatile uint8_t | test_stop = 0
static volatile uint32_t | tx_Done = 0

## Macro Definition Documentation

#define APP_UART_RECEIVE_BUGGER_SIZE 9

Definition at line 59 of file uart_rom.c.

## Function Documentation

static void App_error_routine | ( |  | ) |
| static

Definition at line 86 of file uart_rom.c.

static void App_Interrupt_Send | ( | const char * | send_data,
|  | uint32_t | lenght
| ) |  |
| static

Definition at line 118 of file uart_rom.c.

static void App_Polling_Receive | ( | char * | receive_buffer,
|  | uint32_t | lenght
| ) |  |
| static

Definition at line 105 of file uart_rom.c.

static void App_Polling_Send | ( | const char * | send_data,
|  | uint32_t | lenght
| ) |  |
| static

Definition at line 92 of file uart_rom.c.

static void App_UART_API_Init | ( |  | ) |
| static

Definition at line 132 of file uart_rom.c.

int main | ( | void |  | ) |

Main Function.

Main program body.

Returns
  Nothing

defined(CHIP_LPC175X_6X)

Definition at line 197 of file uart_rom.c.

static void rx_callback | ( | uint32_t | err_code,
|  | uint32_t | n
| ) |  |
| static

Definition at line 166 of file uart_rom.c.

static void tx_callback | ( | uint32_t | err_code,
|  | uint32_t | n
| ) |  |
| static

Definition at line 174 of file uart_rom.c.

void UART0_IRQHandler | ( | void |  | ) |

UART0 ISR handler.

Returns
  Nothing

Definition at line 187 of file uart_rom.c.

## Variable Documentation

volatile uint8_t byte
| static

Definition at line 71 of file uart_rom.c.

const char Interrupt_info[]
| static

Initial value:
=
"\r\nUART Interrupt mode demo! Type a character to be echoed back or \'x\' to exit.\0"

Definition at line 66 of file uart_rom.c.

const char Polling_info[] = "UART Polling mode demo! Please type 'hello NXP' to continue.\0"
| static

Definition at line 65 of file uart_rom.c.

char recv_buf[APP_UART_RECEIVE_BUGGER_SIZE]
| static

Definition at line 70 of file uart_rom.c.

const char terminate[] = "\r\nDemo is terminated. Thanks for using.\0"
| static

Definition at line 68 of file uart_rom.c.

volatile uint8_t test_stop = 0
| static

Definition at line 71 of file uart_rom.c.

volatile uint32_t tx_Done = 0
| static

Definition at line 72 of file uart_rom.c.

UART_HANDLE_T* uart
| static

Definition at line 61 of file uart_rom.c.

uint32_t umem[UART_ROM_MEM_SIZE]
| static

Definition at line 63 of file uart_rom.c.

const char welcome[] = "LPC812 XPresso Board USART API ROM Example.\0"
| static

Definition at line 64 of file uart_rom.c.