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 >
C/C++ Source or Header  |  1991-08-05  |  2KB  |  56 lines

  1. /**********************************************************************\
  2.  *                   SerLib.h   © 1991 G. Glendown                    *
  3.  *                                                                    *
  4.  * This is the Include-File for using SerLib from C.                  *
  5.  * Pragma-Definition only for SAS/C                                   *
  6. \**********************************************************************/
  7.  
  8. #ifndef NOPRAGMAS
  9. #pragma libcall SerLibBase OpenSerial 1E 43210806
  10. #pragma libcall SerLibBase CloseSerial 24 801
  11. #pragma libcall SerLibBase ChangeData 2A 3210805
  12. #pragma libcall SerLibBase WriteSer 30 09803
  13. #pragma libcall SerLibBase ReadSer 36 09803
  14. #pragma libcall SerLibBase GetStatus 3C 9802
  15. #pragma libcall SerLibBase SerBuffer 42 801
  16. #pragma libcall SerLibBase WaitSer 48 0802
  17. #pragma libcall SerLibBase CheckCD 4E 801
  18. #pragma libcall SerLibBase SendSer 54 09803
  19. #pragma libcall SerLibBase RecvSer 5A 09803
  20. #pragma libcall SerLibBase AbortIOSer 60 0802
  21. #pragma libcall SerLibBase CheckIOSer 66 801
  22. #pragma libcall SerLibBase ClearSer 6C 801
  23. #endif
  24. #ifndef NOPROTOS
  25. struct SerLibdata *OpenSerial(char *, long, long, UBYTE, UBYTE, ULONG);
  26. void CloseSerial(struct SerLibData *);
  27. void ChangeData(struct SerLibData *, long, UBYTE, UBYTE, ULONG);
  28. void WriteSer(struct SerLibData *,char *,long);
  29. long ReadSer(struct SerLibData *,char *, long);
  30. void GetStatus(struct SerLibData *, struct SerStatus *);
  31. long SerBuffer(struct SerLibData *);
  32. ULONG WaitSer(struct SerLibData *,ULONG);
  33. BOOL CheckCD(struct SerLibData *);
  34. void SendSer(struct SerLibData *, char *,long);
  35. void RecvSer(struct SerLibData *,char *, long);
  36. void AbortIOSer(struct SerLibData *,ULONG which);
  37. BOOL CheckIOSer(struct SerLibData *);
  38. void ClearSer(struct SerLibData *);
  39. #endif
  40.  
  41. #define    ABORT_SEND    1
  42. #define    ABORT_RECV    2
  43.  
  44.  
  45. struct SerLibData {
  46.     struct Port     *SerPort;    /* You shouldn't fool 'round with these    */
  47.     struct Port     *SerWPort;    
  48.     struct IOExtSer    *SerReq;    /* babies, they're internal use only!    */
  49.     struct IOExtSer    *SerWReq;
  50. };
  51.  
  52. struct SerStatus {
  53.     ULONG    ss_unread;        /* Number of bytes in the serial buffer    */
  54.     UWORD    ss_status;        /* see io_Status in struct IOExtSer        */
  55. };
  56.