delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/21/14:56:30

Date: Thu, 21 Oct 1999 17:25:04 +0200 (MEST)
From: ingo rohlfs <ingo DOT rohlfs AT gmx DOT de>
To: djgpp AT delorie DOT com
Subject: svasync (fwd)
Message-ID: <Pine.LNX.4.10.9910211721250.19134-100000@trick.fh-reutlingen.de>
MIME-Version: 1.0
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id LAA14074
Reply-To: djgpp AT delorie DOT com

hello,

I can't reach "svincent AT cs DOT sonoma DOT edu", 
so perhaps anybody else
has a need for my changed version of "svasync.h".

I found, that is was necessary to declare the prototypes as "extern C"
if I switch from C to C++ (djgpp).

with best regards
ingo rohlfs

-------cut here---------------------------------------------------------------

/*
 * SVAsync 0.10
 * Copyright (c) 1996 Samuel Vincent, 7337 Carioca Ct, Rohnert Park, Ca 94928
 */

/** ingo rohlfs: externe deklaration noetig für c++ */
#ifdef __cplusplus
extern "C" {
#endif

#ifndef _SVASYNC_H_
#define _SVASYNC_H_

int SVAsyncInit(unsigned int CommPort);
int SVAsyncFifoInit(void);
void SVAsyncClear(void);
void SVAsyncStop(void);        
unsigned char SVAsyncIn(void);        
void SVAsyncOut(unsigned char CharOut);
void SVAsyncSet(unsigned int Baud, unsigned int Control);    
void SVAsyncHand(unsigned int Hand);
int SVAsyncInStat(void);
int SVAsyncOutStat(void);        

#define COM1            0
#define COM2            1
#define COM3            2
#define COM4            3

/* Defines for Com Port Paramaters, the second paramater to SVAsyncSet() */
#define BITS_8          0x03
#define BITS_7          0x02
#define STOP_1          0x00
#define STOP_2          0x04
#define EVEN_PARITY     0x18
#define ODD_PARITY      0x08
#define NO_PARITY       0x00

/* Defines for SVAsyncHand() */
#define DTR             0x01
#define RTS             0x02
#define USER            0x04
#define LOOPBACK        0x10

/* Defines for SVAsyncStat() */
#define D_CTS   0x0100
#define D_DSR   0x0200
#define D_RI            0x0400
#define D_DCD   0x0800
#define CTS             0x1000
#define DSR             0x2000
#define RI              0x4000
#define DCD             0x8000
#define PARITY  0x0004
#define THREMPTY        0x0020
#define BREAKDET        0x1000

#endif
#ifdef __cplusplus
}
#endif


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019