home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / m / modemdial / !ModemDial / SerialDev / h / driver next >
Text File  |  1993-01-08  |  2KB  |  61 lines

  1. /*                  _____________________________________________
  2.                   [>                                             <]
  3. Project           [> ARCterm VII                                 <]
  4. Author            [> Hugo Fiennes                                <]
  5. Date started      [> 05-March-1990                               <]
  6.                   [>                                             <]
  7. Module name       [> Driver calls                                <]
  8. Current version   [> 00.04                                       <]
  9. Version date      [> 08-January-1993                             <]
  10. State             [> Unfinished                                  <]
  11.                   [>                                             <]
  12.                   [>   This source is COPYRIGHT © 1992/93 by     <]
  13.                   [>      Hugo Fiennes of The Serial Port        <]
  14.                   [>_____________________________________________<]
  15. */
  16.  
  17. extern int  (*driver)(int,...);
  18. extern int  driver_block[];
  19. extern int  *driver_speedtable,driver_flags,driver_version,driver_noofspeeds;
  20. extern char *driver_info,*driver_creator;
  21. extern void driver_init(void);
  22.  
  23. typedef struct
  24.   {
  25.   int number;
  26.   char file[16];
  27.   char info[32];
  28.   } drivers_block;
  29.  
  30. extern drivers_block drivers[];
  31.  
  32. #define DRIVER_PUTBYTE        0
  33. #define DRIVER_GETBYTE        1
  34. #define DRIVER_PUTBLOCK       2
  35. #define DRIVER_GETBLOCK       3
  36. #define DRIVER_CHECKTX        4
  37. #define DRIVER_CHECKRX        5
  38. #define DRIVER_FLUSHTX        6
  39. #define DRIVER_FLUSHRX        7
  40. #define DRIVER_CONTROLLINES   8
  41. #define DRIVER_MODEMCONTROL   9
  42. #define DRIVER_RXERRORS      10
  43. #define DRIVER_BREAK         11
  44. #define DRIVER_EXAMINE       12
  45. #define DRIVER_TXSPEED       13
  46. #define DRIVER_RXSPEED       14
  47. #define DRIVER_WORDFORMAT    15
  48. #define DRIVER_FLOWCONTROL   16
  49. #define DRIVER_INITIALISE    17
  50. #define DRIVER_CLOSEDOWN     18
  51. #define DRIVER_POLL          19
  52. #define DRIVER_SELECT        20
  53.  
  54. #define driver_txspeed(tx)     (*driver)(DRIVER_TXSPEED,portnumber,tx)
  55. #define driver_rxspeed(rx)     (*driver)(DRIVER_RXSPEED,portnumber,rx)
  56. #define driver_wordformat(w)   (*driver)(DRIVER_WORDFORMAT,portnumber,w)
  57. #define driver_flowcontrol(f)  (*driver)(DRIVER_FLOWCONTROL,portnumber,f)
  58. #define driver_initialise()    (*driver)(DRIVER_INITIALISE,portnumber)
  59. #define driver_closedown()     (*driver)(DRIVER_CLOSEDOWN,portnumber)
  60. #define driver_poll()          (*driver)(DRIVER_POLL,portnumber)
  61.