Files
diplomarbeit/Tester/SW/Eclipse/lib/Drivers/uart2.h
T
Matthias 6cc948eef8 Moved remotely
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@113 9fe90eed-be63-e94b-8204-d34ff4c2ff93
2009-01-12 08:38:14 +00:00

78 lines
2.8 KiB
C

/* ---------------------------------------------------------------------------
* uart2.h - v0.1 (c) 2007 Micro-key bv
* ---------------------------------------------------------------------------
* Micro-key bv
* Industrieweg 28, 9804 TG Noordhorn
* Postbus 92, 9800 AB Zuidhorn
* The Netherlands
* Tel: +31 594 503020
* Fax: +31 594 505825
* Email: support@microkey.nl
* Web: www.microkey.nl
* ---------------------------------------------------------------------------
* Description: UART2-driver
* ---------------------------------------------------------------------------
* Version(s): 0.1, 10-09-2007, Marcel Mulder.
* Creation.
* ---------------------------------------------------------------------------
*/
#ifndef __UART2_H__
#define __UART2_H__
/** \file uart2.h
\brief UART2
*/
/* ---------------------------------------------------------------------------
* System include files.
* ---------------------------------------------------------------------------
*/
#include "app_types.h"
#include "sys_config.h"
#include "LPC_REGS.h"
#include "uart.h"
/* ---------------------------------------------------------------------------
* Application include files.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Constant and macro definitions.
* ---------------------------------------------------------------------------
*/
#define UART2_RX_BUFFER_SIZE 256 // UART2 receive buffer size org. 128
#define UART2_TX_BUFFER_SIZE 256 // UART2 transmit buffer size
/* ---------------------------------------------------------------------------
* Type definitions.
* ---------------------------------------------------------------------------
*/
typedef void (*t_uart2_txcomplete)(void);
/* ---------------------------------------------------------------------------
* Variable declarations.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Function declarations.
* ---------------------------------------------------------------------------
*/
void uart2Init(uint16_t baud, uint8_t mode, uint8_t fmode);
int uart2Putch(int ch);
int uart2Putch_block(int ch);
uint16_t uart2Space(void);
const char *uart2Puts(const char *string);
const char *uart2Puts_block(const char *string);
int uart2Write(const char *buffer, uint16_t count);
int uart2TxEmpty(void);
int uart2RxEmpty(void);
void uart2TxFlush(void);
int uart2Getch(void);
void uart2SubscribeTxFinished( t_uart2_txcomplete callback );
void uart2UnsubsribeTxFinished( t_uart2_txcomplete callback );
#endif /* __UART2_H__ */