Example #1
0
/*
 * Probe for CBM 153x tape device first. If found enter tape mode and
 * return. If not found or unsupported, continue device detection.
 * Try to find an IEEE device next. If not found or unsupported, fall
 * back to IEC.
 */
struct ProtocolFunctions *
cbm_init(void)
{
    struct ProtocolFunctions *protoFn = NULL;

    // Nothing going on with the device yet.
    currState = 0;

#ifdef TAPE_SUPPORT
    if (Probe4TapeDevice() == Tape_Status_OK_Tape_Device_Present)
    {
        Enter_Tape_Mode(&protoFn);
        currState |= XUM1541_TAPE_PRESENT;
        return protoFn;
    }
#endif

#ifdef IEEE_SUPPORT
    protoFn = ieee_init();
    if (protoFn != NULL) {
        currState |= XUM1541_IEEE488_PRESENT;
        return protoFn;
    }
#endif

    // Always use IEC as last resort.
    board_init_iec();
    protoFn = iec_init();
    return protoFn;
}
void drs155m_init() {
	iec_init();
}