BLE demo for mbed Ported RunningElectronics's SBDBT firmware for BLE. It can communicate with iOS

Dependencies:   FatFileSystem mbed

Fork of BTstack by Norimasa Okamoto

uvc/uvcctl.cpp

Committer:
va009039
Date:
2012-06-26
Revision:
0:1ed23ab1345f

File content as of revision 0:1ed23ab1345f:

#include "mbed.h"
#include "uvc.h"
#define __DEBUG
#include "mydbg.h"

UsbErr uvc::Control(int req, int cs, int index, uint8_t* buf, int size)
{
    UsbErr rc;
    if (req == SET_CUR) {    
        rc = m_pDev->controlSend(
                    USB_HOST_TO_DEVICE | USB_REQUEST_TYPE_CLASS | USB_RECIPIENT_INTERFACE, 
                    req, cs<<8, index, buf, size);
        return rc;
    }
    rc = m_pDev->controlReceive(
                USB_DEVICE_TO_HOST | USB_REQUEST_TYPE_CLASS | USB_RECIPIENT_INTERFACE, 
                req, cs<<8, index, buf, size);
    return rc;
}