Beispiel #1
0
int MTDHelperEntry(int func, void *a1, void *a2)
{
    switch (func) {
    case MTDRequestWindow:
	return CardServices(RequestWindow, a1, a2, NULL);
    case MTDReleaseWindow:
	return CardServices(ReleaseWindow, a1, NULL, NULL);
    case MTDModifyWindow:
	return mtd_modify_window(a1, a2); break;
    case MTDSetVpp:
	return mtd_set_vpp(a1, a2); break;
    case MTDRDYMask:
	return mtd_rdy_mask(a1, a2); break;
    default:
	return CS_UNSUPPORTED_FUNCTION; break;
    }
} /* MTDHelperEntry */
int MTDHelperEntry(int func, void *a1, void *a2)
{
    switch (func) {
    case MTDRequestWindow:
    {
	window_handle_t w;
        int ret = pcmcia_request_window(a1, a2, &w);
        (window_handle_t *)a1 = w;
	return  ret;
    }
        break;
    case MTDReleaseWindow:
	return pcmcia_release_window(a1);
    case MTDModifyWindow:
	return mtd_modify_window(a1, a2); break;
    case MTDSetVpp:
	return mtd_set_vpp(a1, a2); break;
    case MTDRDYMask:
	return mtd_rdy_mask(a1, a2); break;
    default:
	return CS_UNSUPPORTED_FUNCTION; break;
    }
} /* MTDHelperEntry */