home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d523
/
serlib.lha
/
SerLib
/
Programming
/
serlib.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-08-05
|
2KB
|
56 lines
/**********************************************************************\
* SerLib.h © 1991 G. Glendown *
* *
* This is the Include-File for using SerLib from C. *
* Pragma-Definition only for SAS/C *
\**********************************************************************/
#ifndef NOPRAGMAS
#pragma libcall SerLibBase OpenSerial 1E 43210806
#pragma libcall SerLibBase CloseSerial 24 801
#pragma libcall SerLibBase ChangeData 2A 3210805
#pragma libcall SerLibBase WriteSer 30 09803
#pragma libcall SerLibBase ReadSer 36 09803
#pragma libcall SerLibBase GetStatus 3C 9802
#pragma libcall SerLibBase SerBuffer 42 801
#pragma libcall SerLibBase WaitSer 48 0802
#pragma libcall SerLibBase CheckCD 4E 801
#pragma libcall SerLibBase SendSer 54 09803
#pragma libcall SerLibBase RecvSer 5A 09803
#pragma libcall SerLibBase AbortIOSer 60 0802
#pragma libcall SerLibBase CheckIOSer 66 801
#pragma libcall SerLibBase ClearSer 6C 801
#endif
#ifndef NOPROTOS
struct SerLibdata *OpenSerial(char *, long, long, UBYTE, UBYTE, ULONG);
void CloseSerial(struct SerLibData *);
void ChangeData(struct SerLibData *, long, UBYTE, UBYTE, ULONG);
void WriteSer(struct SerLibData *,char *,long);
long ReadSer(struct SerLibData *,char *, long);
void GetStatus(struct SerLibData *, struct SerStatus *);
long SerBuffer(struct SerLibData *);
ULONG WaitSer(struct SerLibData *,ULONG);
BOOL CheckCD(struct SerLibData *);
void SendSer(struct SerLibData *, char *,long);
void RecvSer(struct SerLibData *,char *, long);
void AbortIOSer(struct SerLibData *,ULONG which);
BOOL CheckIOSer(struct SerLibData *);
void ClearSer(struct SerLibData *);
#endif
#define ABORT_SEND 1
#define ABORT_RECV 2
struct SerLibData {
struct Port *SerPort; /* You shouldn't fool 'round with these */
struct Port *SerWPort;
struct IOExtSer *SerReq; /* babies, they're internal use only! */
struct IOExtSer *SerWReq;
};
struct SerStatus {
ULONG ss_unread; /* Number of bytes in the serial buffer */
UWORD ss_status; /* see io_Status in struct IOExtSer */
};