Macros | Functions
detect.c File Reference

Shared library / DLL for accessing the driver. More...

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

Go to the source code of this file.


#define DLL
 mark: We are building the DLL */


int CBMAPIDECL cbm_identify (CBM_FILE HandleDevice, unsigned char DeviceAddress, enum cbm_device_type_e *CbmDeviceType, const char **CbmDeviceString)
 Identify the connected floppy drive. More...

Detailed Description

Shared library / DLL for accessing the driver.

Michael Klein, Spiro Trikaliotis

Definition in file detect.c.

Macro Definition Documentation


The name of the executable

Definition at line 26 of file detect.c.


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

Definition at line 23 of file detect.c.

Function Documentation

int CBMAPIDECL cbm_identify ( CBM_FILE  HandleDevice,
unsigned char  DeviceAddress,
enum cbm_device_type_e CbmDeviceType,
const char **  CbmDeviceString 

Identify the connected floppy drive.

This function tries to identify a connected floppy drive. For this, it performs some M-R operations.

HandleDeviceA CBM_FILE which contains the file handle of the driver.
DeviceAddressThe address of the device on the IEC serial bus. This is known as primary address, too.
CbmDeviceTypePointer to an enum which will hold the type of the device.
CbmDeviceStringPointer to a pointer which will point on a string which tells the name of the device.
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 66 of file detect.c.

References cbm_dt_cbm1541, cbm_dt_cbm1570, cbm_dt_cbm1571, cbm_dt_cbm1581, cbm_dt_cbm3040, cbm_dt_cbm4040, cbm_dt_cbm8050, cbm_dt_cbm8250, cbm_dt_unknown, cbm_exec_command(), cbm_raw_read(), cbm_talk(), cbm_untalk(), FUNC_ENTER, and FUNC_LEAVE_INT.

Referenced by cbm_identify_xp1541(), and vdd_identify().