home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.1 (Developer) [x86] / NeXT Step 3.1 Intel dev.cdr.dmg / NextDeveloper / Headers / bsd / dev / FloppyCntPublic.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-30  |  1.5 KB  |  66 lines

  1. /*     Copyright (c) 1991 NeXT Computer, Inc.  All rights reserved. 
  2.  *
  3.  * FloppyCntPublic.h - Public API to Floppy Controller object (FloppyCnt).
  4.  *
  5.  * HISTORY
  6.  * 09-Nov-92    Doug Mitchell at NeXT
  7.  *      Created. 
  8.  */
  9.  
  10. #ifndef    _BSD_DEV_FLOPPY_CNT_PUBLIC_H_
  11. #define _BSD_DEV_FLOPPY_CNT_PUBLIC_H_
  12.  
  13. #import <bsd/dev/fd_extern.h>
  14. #import <driverkit/return.h>
  15. #import <objc/objc.h>            /* for BOOL */
  16.  
  17. /*
  18.  * One per drive_type (in FloppyGlobals.c).
  19.  */
  20. typedef struct {
  21.     struct drive_info    gen_drive_info;        /* name, block length,
  22.                              * etc. */
  23.     int            seek_rate;        /* in ms */
  24.     int             head_settle_time;    /* ms */
  25.     int             head_unload_time;    /* ms */
  26.     BOOL            is_perpendicular;    /* perp. recording */
  27.     BOOL            do_precomp;        /* precomp recording */
  28. } fdDriveInfo_t;
  29.  
  30. /*
  31.  * The sole exported method implemented by FloppyCnt.
  32.  */
  33. @protocol FloppyControllerPublic
  34.  
  35. - (IOReturn)fcCmdXfr        : (fdIoReq_t *)fdIoReq
  36.                   driveInfo:(fdDriveInfo_t *)driveInfo;
  37.  
  38. @end
  39.  
  40. /*
  41.  * Public routines shared between FloppyDisk and FloppyController.
  42.  */
  43.  
  44. /*
  45.  * Map fdr_return_t to IOReturn.
  46.  */
  47. IOReturn fdrToIo(fd_return_t fdr);
  48.           
  49. /*
  50.  * Allocate and free fdIoReq's.
  51.  */
  52. fdIoReq_t *allocFdIoReq();
  53. void freeFdIoReq(fdIoReq_t *fdIoReq);
  54.  
  55. /*
  56.  * Allocate some well-aligned memory. *freePP is what has to be IOFree()'d
  57.  * eventually; *freecnt is the size arg to IOFree. The return value is the
  58.  * well-aligned pointer.
  59.  */
  60. void *floppyMalloc(int size, 
  61.     void **freePP,
  62.     int *freecnt);
  63.  
  64. #endif    _BSD_DEV_FLOPPY_CNT_PUBLIC_H_
  65.  
  66.