home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************\
- * 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 */
- };
-