/*
Copyright (C) Magna Carta Software, Inc. 1988-1990. All Rights Reserved.
C COMMUNICATIONS TOOLKIT
CCTDEV.H -- Manifest constant definitions used in CCT development.
These are not intended to be user-accessable.
*/
#if !defined(CCTDEV_INCLUDED)
#define CCTDEV_INCLUDED
#if !defined(XDEBUG)
#define XDEBUG 0
#endif
/* TIMING MANIFEST CONSTANTS */
#define LOW_TIME 0X46C
#define HIGH_TIME 0X46E
/* FLOW CONTROL TYPES FOR EACH DIRECTION */
#define RXONXOFF 0X01 /* accept XON-XOFF */
#define RRTS_CTS 0X02 /* accept RTS/CTS */
#define RDTR_DSR 0X04 /* accept DTR/DSR */
#define TXONXOFF 0X10 /* assert XON-XOFF */
#define TRTS_CTS 0X20 /* assert RTS/CTS */
#define TDTR_DSR 0X40 /* assert DTR/DSR */
#define ABORT 2 /* return from critical error */
#if !defined(CCTDEF_H_INCLUDED)
#include <cctdef.h>
#endif
#if !defined(CCTTYPE_H_INCLUDED)
#include <ccttype.h>
#endif
#if !defined(XFER_H_INCLUDED)
#include <xfer.h>
#endif
/* FILE I/O FUNCTIONS */
short FCALL_ cct_file_close_(FHANDLE fh);
FHANDLE FCALL_ cct_file_open_(const char *fspec, int fmode);
int FCALL_ cct_file_read_(FHANDLE fh, const void *buf, size_t count);
long FCALL_ cct_file_seek_(FHANDLE fh, long offset, int where);
short FCALL_ cct_file_stat_(const char *path, struct stat *s);
int FCALL_ cct_file_write_(FHANDLE fh, const void *buf, size_t count);
/* PROTOTYPES FOR FUNCTIONS USED INTERNALLY */
short FCALL_ c_calloc_(XFER *x, unsigned bufsize);
short FCALL_ c_fgetc_(XFER *x);
short FCALL_ c_fpeekc_(XFER *x);
short FCALL_ c_fputc_(COMM_PORT *p, short ch);
short FCALL_ c_fwrite_(COMM_PORT *p, XFER *x);
void FCALL_ ffreebuf_(XFER *x);
short FCALL_ fmakebuf_(XFER *x, WORD len);
long FCALL_ fseekbuf_(XFER *x, long offset, int where);
short FCALL_ i_read(COMM_PORT *p_port);
short FCALL_ i_rxstat(COMM_PORT *p_port);
void FCALL_ i_txstart(COMM_PORT *p);
short FCALL_ i_txstat(COMM_PORT *p_port);
void FCALL_ i_write(COMM_PORT *p_port, WORD c);
short FCALL_ rx_ascii_(COMM_PORT *p);
void FCALL_ start_timer(long *start);
void FCALL_ stop_timer(long *start, long *stop, double *elapsed_time);
/* INTERNAL VARIABLES */
extern short cct_isr_count; /* The number of ISRs used */
#endif