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

Committer:
va009039
Date:
Tue Jun 26 14:27:45 2012 +0000
Revision:
0:1ed23ab1345f
fix overflow spp_service_buffer

Who changed what in which revision?

UserRevisionLine numberNew contents of line
va009039 0:1ed23ab1345f 1 #include "mbed.h"
va009039 0:1ed23ab1345f 2 #include "uvc.h"
va009039 0:1ed23ab1345f 3 #define __DEBUG
va009039 0:1ed23ab1345f 4 #include "mydbg.h"
va009039 0:1ed23ab1345f 5
va009039 0:1ed23ab1345f 6 UsbErr uvc::Control(int req, int cs, int index, uint8_t* buf, int size)
va009039 0:1ed23ab1345f 7 {
va009039 0:1ed23ab1345f 8 UsbErr rc;
va009039 0:1ed23ab1345f 9 if (req == SET_CUR) {
va009039 0:1ed23ab1345f 10 rc = m_pDev->controlSend(
va009039 0:1ed23ab1345f 11 USB_HOST_TO_DEVICE | USB_REQUEST_TYPE_CLASS | USB_RECIPIENT_INTERFACE,
va009039 0:1ed23ab1345f 12 req, cs<<8, index, buf, size);
va009039 0:1ed23ab1345f 13 return rc;
va009039 0:1ed23ab1345f 14 }
va009039 0:1ed23ab1345f 15 rc = m_pDev->controlReceive(
va009039 0:1ed23ab1345f 16 USB_DEVICE_TO_HOST | USB_REQUEST_TYPE_CLASS | USB_RECIPIENT_INTERFACE,
va009039 0:1ed23ab1345f 17 req, cs<<8, index, buf, size);
va009039 0:1ed23ab1345f 18 return rc;
va009039 0:1ed23ab1345f 19 }