Listing 117 Commrtos H

*********************************************************

* Embedded Systsns Building Blocks

* Complete and Ready-to-Use Modules in C

* Asynchronous Serial Ccarmunications

* Buffered Serial I/O

* (c) Copyright 1999, Jean J. Labrosse, Weston, FL

* All Rights Reserved

* Filename : CCMMRTOS.H

* Prograrrroer : Jean J. Labrosse

*********************************************************************************************************

* CONFIGURATION CONSTANTS

#ifndef CPG_H

#define OCMM_RX_BUF_SIZE #define 004M_TX_BUF_SIZE

64 64

/* Number of characters in Rx ring buffer /* Number of characters in Tx ring buffer

#ifndef NUL #define NUL #endif

0x00

#define CCMML #define COM2

#define #define #define #define #define #define #define

COM_NO_ERR

OCMM_BAD_CH

OCMM_RX_EMTY

004M_TX_FULL

OOM_TX_EMPTY

COM_RX_TIMEOUT

COM_TX_TIMEOUT

/* Function call was successful */

/* Invalid ccntiunications port channel */

/* Rx buffer is enpty, no character available */

/* Tx buffer is full, could not deposit character */ /* If the Tx buffer is empty. */

/* If a timeout occurred while waiting for a character*/ /* If a timeout occurred while waiting to send a char.*/

#define #define #define

COM_PARITY_NQNE

COM_PARITY_ODD

COM_PARITY_EVEN

/* Defines for setting parity

#ifdef CCMMJ3L0BALS #define CCMM_EXT #else ttdefine CCMM_EXT extern #endif /*$PAGE*/ /*

**********************************************************************************

* FUNCTION PROTOTYPES

*********************************************************************************************************

INT8U ConrGetChar (INT8U ch, HSTT16U to, INT8U *err) ;

INT8U CormGetTxChar (INT8U ch, INT8U *err) ;

void Caitnlnit(void) ;

BOOLEAN CaimlsEhpty (INr8U ch) ;

BOOLEAN CaimIsFull(INI8U ch) ;

INT8U CommPutChar (INT8U ch, INT8U c, IOT16U to) ;

void ComnPutRxChar (IOT8U ch, INT8U c) ;

Was this article helpful?

0 0

Post a comment