UART/AutoBaud/uart_autobaud_test.c File Reference

#include "lpc17xx_uart.h"
#include "lpc17xx_libcfg.h"
#include "lpc17xx_nvic.h"
#include "lpc17xx_pinsel.h"

Defines

#define UART_PORT   1
#define TEST_UART   LPC_UART1

Functions

void print_menu (void)
 Print Welcome Screen Menu subroutine.
void UART1_IRQHandler (void)
 UART1 interrupt handler sub-routine reference, just to call the standard interrupt handler in uart driver.
void UART_ABIntCallback (uint32_t bABIntType)
 Auto baudrate callback function.
void UART_IntErr (uint8_t bLSErrType)
 UART Line Status Error callback.
int c_entry (void)
 Main UART testing example sub-routine First, the user must type 'A' or 'a' character to start Auto baud rate mode. Once Auto baud rate mode completed, print welcome screen, then press any key to have it read in from the terminal and returned back to the terminal.
  • Press ESC to exit
  • Press 'r' to print welcome screen menu again.

int main (void)
void check_failed (uint8_t *file, uint32_t line)

Variables

uint8_t syncmenu [] = "AutoBaudrate Status: Synchronous! \n\r"
uint8_t menu1 [] = "Hello NXP Semiconductors \n\r"
uint8_t menu2 []
uint8_t menu3 [] = "UART demo terminated!\n"
__IO FlagStatus Synchronous

Detailed Description

: An example of UART using auto baud rate and interrupt mode to test the UART driver
Version:
: 1.0
Date:
: 18. Mar. 2009
Author:
: HieuNguyen ---------------------------------------------------------------------------- Software that is described herein is for illustrative purposes only which provides customers with programming information regarding the products. This software is supplied "AS IS" without any warranties. NXP Semiconductors assumes no responsibility or liability for the use of the software, conveys no license or title under any patent, copyright, or mask work right to the product. NXP Semiconductors reserves the right to make changes in the software without notification. NXP Semiconductors also make no representation or warranty that such application will be suitable for the specified use without further testing or modification.

Function Documentation

void print_menu ( void   ) 

Print Welcome Screen Menu subroutine.

Parameters:
None 
Returns:
None
Print Welcome Screen Menu subroutine.

print_menu

Print Welcome menu.

print menu

Print menu.

Parameters:
[in] none 
Returns:
none
Print Welcome Screen Menu subroutine.

print_menu

print menu operation

Print Welcome menu.

print menu

Print Welcome Screen Menu subroutine.

print_menu

Print Welcome menu.

print menu

Parameters:
[in] none 
Returns:
none
Parameters:
[in] none 
Returns:
None
Parameters:
[in] None 
Returns:
None
Parameters:
None 
Returns:
None
Print menu.

Parameters:
[in] none 
Returns:
none

void UART1_IRQHandler ( void   ) 

UART1 interrupt handler sub-routine reference, just to call the standard interrupt handler in uart driver.

UART0 interrupt handler sub-routine reference, just to call the standard interrupt handler in uart driver.

Parameters:
None 
Returns:
None

void UART_ABIntCallback ( uint32_t  bABIntType  ) 

Auto baudrate callback function.

Parameters:
[in] bABType Auto baudrate interrupt type
Returns:
None

void UART_IntErr ( uint8_t  bLSErrType  ) 

UART Line Status Error callback.

Parameters:
[in] bLSErrType UART Line Status Error Type
Returns:
None


Variable Documentation

uint8_t menu2[]

Initial value:

"UART Auto Baudrate demo\n\r\t "
"MCU LPC17xx - ARM Cortex-M3 \n\r\t "
"UART0 - Auto Baud rate mode used \n\r"


Generated on Thu Apr 22 11:13:08 2010 for CMSISExampleCode by  doxygen 1.5.8