Esempio n. 1
0
/*********************************************************************//**
 * @brief 			get  the maximum logical unit from the device.
 * @param[in]		None.
 * @return 		The maximum logical uint
 **********************************************************************/
int32_t  MS_GetMaxLUN (void)
{
    int32_t  rc;


    rc = Host_CtrlRecv(USB_DEVICE_TO_HOST | USB_REQUEST_TYPE_CLASS | USB_RECIPIENT_INTERFACE,
                       MS_GET_MAX_LUN_REQ,
                       0,
                       0,
                       1,
                       TDBuffer);
    return (rc); 
}
T_uezError Host_GetString(
            void *aWorkspace,
            TUInt8 aDeviceAddress,
            TUInt32 aIndex,
            TUInt8 *aBuffer,
            TUInt32 aSize,
            TUInt32 aTimeout)
{
    return Host_CtrlRecv(
        aWorkspace,
        aBuffer,
        aDeviceAddress,
        USB_DEVICE_TO_HOST | USB_RECIPIENT_DEVICE,
        GET_DESCRIPTOR,
        (3 << 8)|(aIndex),
        0,
        aSize,
        aTimeout);
}
T_uezError Host_Control(
            void *aWorkspace,
            TUInt8 aDeviceAddress,
            TUInt8 aBMRequestType,
            TUInt8 aRequest,
            TUInt16 aValue,
            TUInt16 aIndex,
            TUInt16 aLength,
            void *aBuffer,
            TUInt32 aTimeout)
{
    return Host_CtrlRecv(
            aWorkspace,
            aBuffer,
            aDeviceAddress,
            aBMRequestType,
            aRequest,
            aValue,
            aIndex,
            aLength,
            aTimeout);
}