373a8c32b2
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@55 9fe90eed-be63-e94b-8204-d34ff4c2ff93
77 lines
2.8 KiB
C
77 lines
2.8 KiB
C
/* ---------------------------------------------------------------------------
|
|
* uart3.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: UART3-driver
|
|
* ---------------------------------------------------------------------------
|
|
* Version(s): 0.1, 10-09-2007, Marcel Mulder.
|
|
* Creation.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
#ifndef __UART3_H__
|
|
#define __UART3_H__
|
|
/** \file uart3.h
|
|
\brief UART3
|
|
*/
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* 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 UART3_RX_BUFFER_SIZE 256 // UART3 receive buffer size
|
|
#define UART3_TX_BUFFER_SIZE 256 // UART3 transmit buffer size
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Type definitions.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
typedef void (*t_uart3_txcomplete)(void);
|
|
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Variable declarations.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Function declarations.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
void uart3Init(uint16_t baud, uint8_t mode, uint8_t fmode);
|
|
int uart3Putch(int ch);
|
|
int uart3Putch_block(int ch);
|
|
uint16_t uart3Space(void);
|
|
const char *uart3Puts(const char *string);
|
|
const char *uart3Puts_block(const char *string);
|
|
int uart3Write(const char *buffer, uint16_t count);
|
|
int uart3TxEmpty(void);
|
|
int uart3RxEmpty(void);
|
|
void uart3TxFlush(void);
|
|
int uart3Getch(void);
|
|
void uart3SubscribeTxFinished( t_uart3_txcomplete callback );
|
|
void uart3UnsubsribeTxFinished( t_uart3_txcomplete callback );
|
|
|
|
#endif /* __UART3_H__ */
|