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

detectxp1541.c File Reference

Shared library / DLL for accessing the driver Detect an XP1541/XP1571 parallel cable. More...

#include "debug.h"
#include <stdlib.h>
#include "opencbm.h"
#include "archlib.h"
#include "arch.h"

Go to the source code of this file.

Defines

#define DBG_USERMODE
#define DBG_PROGNAME   "OPENCBM.DLL"
#define DLL
 mark: We are building the DLL */

Functions

int CBMAPIDECL cbm_identify_xp1541 (CBM_FILE HandleDevice, __u_char DeviceAddress, enum cbm_device_type_e *CbmDeviceType, enum cbm_cable_type_e *CableType)
 Identify the cable connected to a specific floppy drive.


Detailed Description

Shared library / DLL for accessing the driver Detect an XP1541/XP1571 parallel cable.

**************************************************************

Author:
Spiro Trikaliotis
Version:
Id
detectxp1541.c,v 1.5 2005/07/23 13:13:42 trikalio Exp


Definition in file detectxp1541.c.


Define Documentation

#define DBG_PROGNAME   "OPENCBM.DLL"
 

The name of the executable

Definition at line 26 of file detectxp1541.c.

#define DBG_USERMODE
 

Mark: We are in user-space (for debug.h)

Definition at line 23 of file detectxp1541.c.


Function Documentation

int CBMAPIDECL cbm_identify_xp1541 CBM_FILE  HandleDevice,
__u_char  DeviceAddress,
enum cbm_device_type_e CbmDeviceType,
enum cbm_cable_type_e CableType
 

Identify the cable connected to a specific floppy drive.

This function tries to identify if the given floppy drive has an XP1541 cable connected.

Parameters:
HandleDevice A CBM_FILE which contains the file handle of the driver.
DeviceAddress The address of the device on the IEC serial bus. This is known as primary address, too.
CbmDeviceType Pointer to an enum which holds the type of the device. If this pointer is NULL or the device type is set to unknown, this function calls cbm_identify itself to find out the device type. If this pointer is not set to NULL, this function will return the device type there.
CableType Pointer to an enum which will hold the cable type of the device on return.
Returns:
0 if the drive could be contacted. It does not mean that the device could be identified.
If cbm_driver_open() did not succeed, it is illegal to call this function.

Definition at line 188 of file detectxp1541.c.

References cbm_ct_none, cbm_ct_unknown, cbm_ct_xp1541, cbm_dt_cbm1541, cbm_dt_cbm1570, cbm_dt_cbm1571, cbm_dt_unknown, cbm_identify(), cbm_pp_read(), DBG_ASSERT, DBG_PREFIX, DBG_PRINT, FUNC_ENTER, and FUNC_LEAVE_INT.

Referenced by vdd_identify_xp1541().


Generated on Sun Apr 30 18:46:06 2006 for opencbm by  doxygen 1.4.2