/******************************************************************************* * * * Copyright 2010 Rheinmetall Canada Inc. * * * * No part of this document may be reproduced, stored in * * a retrieval system, or transmitted, in any form or by any means, * * electronic, mechanical, photocopying, recording, or otherwise, * * without the prior written permission of Rheinmetall Canada Inc. * * * *******************************************************************************/ /* Description: This is a template file for standard C header file. */ /* ************************************************************************** */ /* ¤Revision: 000 20100616 JFM, Original version. ### YYYYMMDD Initial, Bug Identification Change description. */ #ifndef INTERNAL_UART_H #define INTERNAL_UART_H /* ************************************************************************** */ /* Includes */ /* ************************************************************************** */ /* Defines */ #define INTERNAL_UART_BUFFER_DEPTH 16 #define USE_TX_INTERNAL_BUFFER /* ************************************************************************** */ /* Type definitions */ /*typedef enum { INTERNAL_UART_PORT_1A, INTERNAL_UART_PORT_1B, INTERNAL_UART_PORT_2A, INTERNAL_UART_PORT_2B, INTERNAL_UART_PORT_3A, INTERNAL_UART_PORT_3B, MAX_INTERNAL_UART_PORT }eInternalUartPorts;*/ typedef enum { INT_UART_NO_PARITY, INT_UART_EVEN_PARITY, INT_UART_ODD_PARITY }eIntUartParity; typedef enum { INT_UART_ONE_STOP_BIT, INT_UART_TWO_STOP_BITS }eIntUartStopBits; typedef enum { INT_UART_INTERRUPT_OFF, INT_UART_INTERRUPT_ON }eIntUartInterruptOnOff; typedef struct { char *pcTxDataPtr; char *pcTxCircBufferTail; char *pcTxCircBufferHead; int iTxDataSize; int iTxDataCounter; int iIsBusy; int iIsOpened; int iUartHandle; }stInternalUartData; /* ************************************************************************** */ /* Prototypes */ void InternalUartInit(void); int OpenInternalPort(char *p_pcHeadPtr, char *p_pcTailPtr, int p_iBaudRate, int p_iNbStopBits, int p_iParityEnable); int SendInternalUartData(char *p_pcDataBuf, int p_iDataSize); int ReadInternalUart(void); void CloseInternalUart(void); #endif //EOF