Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

WINBUILD/archmnib.c

Go to the documentation of this file.
00001 /*
00002  *      This program is free software; you can redistribute it and/or
00003  *      modify it under the terms of the GNU General Public License
00004  *      as published by the Free Software Foundation; either version
00005  *      2 of the License, or (at your option) any later version.
00006  *
00007  *  Copyright 2005      Tim Schürmann
00008  *  Copyright 2005      Spiro Trikaliotis
00009  *
00010 */
00011 
00021 #include <windows.h>
00022 #include <windowsx.h>
00023 
00024 #include <mmsystem.h>
00025 
00027 #define DBG_USERMODE
00028 
00030 #define DBG_PROGNAME "OPENCBM.DLL"
00031 
00032 #include "debug.h"
00033 
00034 #include <winioctl.h>
00035 #include "cbmioctl.h"
00036 
00037 #include <stdlib.h>
00038 
00040 #define DLL
00041 #include "i_opencbm.h"
00042 #include "archlib.h"
00043 
00044 
00060 __u_char
00061 cbmarch_parallel_burst_read(CBM_FILE HandleDevice)
00062 {
00063     CBMT_PARBURST_PREAD_OUT result;
00064 
00065     FUNC_ENTER();
00066 
00067     cbm_ioctl(HandleDevice, CBMCTRL(PARBURST_READ), NULL, 0, &result, sizeof(result));
00068 
00069     FUNC_LEAVE_UCHAR(result.Byte);
00070 }
00071 
00087 void
00088 cbmarch_parallel_burst_write(CBM_FILE HandleDevice, __u_char Value)
00089 {
00090     CBMT_PARBURST_PWRITE_IN parameter;
00091 
00092     FUNC_ENTER();
00093 
00094     parameter.Byte = Value;
00095 
00096     cbm_ioctl(HandleDevice, CBMCTRL(PARBURST_WRITE), &parameter, sizeof(parameter), NULL, 0);
00097 
00098     FUNC_LEAVE();
00099 }
00100 
00122 int
00123 cbmarch_parallel_burst_read_track(CBM_FILE HandleDevice, __u_char *Buffer, unsigned int Length)
00124 {
00125     int retval = 0;
00126 
00127     FUNC_ENTER();
00128 
00129     retval = cbm_ioctl(HandleDevice, CBMCTRL(PARBURST_READ_TRACK),
00130         NULL, 0,
00131         Buffer, Length);
00132 
00133     if (retval == 0)
00134     {
00135         DBG_WARN((DBG_PREFIX "opencbm: cbm.c: parallel_burst_read_track: ioctl returned with error %u", retval));
00136     }
00137 
00138     FUNC_LEAVE_INT(retval);
00139 }
00140 
00162 int
00163 cbmarch_parallel_burst_write_track(CBM_FILE HandleDevice, __u_char *Buffer, unsigned int Length)
00164 {
00165     int retval = 0;
00166 
00167     FUNC_ENTER();
00168 
00169     retval = cbm_ioctl(HandleDevice, CBMCTRL(PARBURST_WRITE_TRACK),
00170         Buffer, Length,
00171         NULL, 0);
00172 
00173     if (retval == 0)
00174     {
00175         DBG_WARN((DBG_PREFIX "opencbm: cbm.c: parallel_burst_write_track: ioctl returned with error %u", retval));
00176     }
00177 
00178     FUNC_LEAVE_INT(retval);
00179 }

Generated on Sun Apr 30 18:45:43 2006 for opencbm by  doxygen 1.4.2