/************************************************************************* ** ** Broadcom Corp. Confidential ** Copyright 1999, 2000 Broadcom Corp. All Rights Reserved. ** ** THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE ** AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR ** EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. ** ** File: serial.h ** Description: polled uart io ** Created: Jeff Fisher ** REVISION: ** ****************************************************************************/ #ifndef __serial__ #define __serial__ #include "bstd.h" #include "bcmuart.h" #include "bos.h" #ifdef __cplusplus extern "C" { #endif typedef struct _urt_t { unsigned long rxRead; unsigned long rxWrite; unsigned long rxBufferSize; unsigned char *pRxFifo; b_mutex_t lock; } urt_t; void serial_init(volatile UartChannel *uart,unsigned int baud); int serial_getc(volatile UartChannel *uart, bool block); void serial_putc(volatile UartChannel *uart, int c); void serial_start(volatile UartChannel *uart, bool start); #define CONSOLE_UART UARTA #ifdef __cplusplus } #endif #endif /* __serial__ */