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:
todotani
Date:
Wed Feb 20 14:18:38 2013 +0000
Revision:
6:cf06ba884429
Parent:
0:1ed23ab1345f
Change tick timer to 1ms. Change attribute 0xFFF1 as read of DigitalIn p5

Who changed what in which revision?

UserRevisionLine numberNew contents of line
va009039 0:1ed23ab1345f 1 /*
va009039 0:1ed23ab1345f 2 Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com)
va009039 0:1ed23ab1345f 3
va009039 0:1ed23ab1345f 4 Permission is hereby granted, free of charge, to any person obtaining a copy
va009039 0:1ed23ab1345f 5 of this software and associated documentation files (the "Software"), to deal
va009039 0:1ed23ab1345f 6 in the Software without restriction, including without limitation the rights
va009039 0:1ed23ab1345f 7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
va009039 0:1ed23ab1345f 8 copies of the Software, and to permit persons to whom the Software is
va009039 0:1ed23ab1345f 9 furnished to do so, subject to the following conditions:
va009039 0:1ed23ab1345f 10
va009039 0:1ed23ab1345f 11 The above copyright notice and this permission notice shall be included in
va009039 0:1ed23ab1345f 12 all copies or substantial portions of the Software.
va009039 0:1ed23ab1345f 13
va009039 0:1ed23ab1345f 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
va009039 0:1ed23ab1345f 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
va009039 0:1ed23ab1345f 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
va009039 0:1ed23ab1345f 17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
va009039 0:1ed23ab1345f 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
va009039 0:1ed23ab1345f 19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
va009039 0:1ed23ab1345f 20 THE SOFTWARE.
va009039 0:1ed23ab1345f 21 */
va009039 0:1ed23ab1345f 22
va009039 0:1ed23ab1345f 23 #ifndef USB_MEM_H
va009039 0:1ed23ab1345f 24 #define USB_MEM_H
va009039 0:1ed23ab1345f 25
va009039 0:1ed23ab1345f 26 #ifdef __cplusplus
va009039 0:1ed23ab1345f 27 extern "C" {
va009039 0:1ed23ab1345f 28 #endif
va009039 0:1ed23ab1345f 29
va009039 0:1ed23ab1345f 30 typedef unsigned char byte;
va009039 0:1ed23ab1345f 31
va009039 0:1ed23ab1345f 32 void usb_mem_init();
va009039 0:1ed23ab1345f 33
va009039 0:1ed23ab1345f 34 volatile byte* usb_get_hcca();
va009039 0:1ed23ab1345f 35
va009039 0:1ed23ab1345f 36 volatile byte* usb_get_ed();
va009039 0:1ed23ab1345f 37
va009039 0:1ed23ab1345f 38 volatile byte* usb_get_td(uint32_t endpoint);
va009039 0:1ed23ab1345f 39 volatile byte* usb_get_itd(uint32_t endpoint);
va009039 0:1ed23ab1345f 40
va009039 0:1ed23ab1345f 41 volatile byte* usb_get_bp(int size);
va009039 0:1ed23ab1345f 42 int usb_bp_size();
va009039 0:1ed23ab1345f 43
va009039 0:1ed23ab1345f 44 void usb_free_ed(volatile byte* ed);
va009039 0:1ed23ab1345f 45
va009039 0:1ed23ab1345f 46 void usb_free_td(volatile byte* td);
va009039 0:1ed23ab1345f 47
va009039 0:1ed23ab1345f 48 void usb_free_itd(volatile byte* itd);
va009039 0:1ed23ab1345f 49
va009039 0:1ed23ab1345f 50 void usb_free_bp(volatile byte* bp);
va009039 0:1ed23ab1345f 51
va009039 0:1ed23ab1345f 52 bool usb_is_td(volatile byte* td);
va009039 0:1ed23ab1345f 53 bool usb_is_itd(volatile byte* td);
va009039 0:1ed23ab1345f 54
va009039 0:1ed23ab1345f 55 #ifdef __cplusplus
va009039 0:1ed23ab1345f 56 }
va009039 0:1ed23ab1345f 57 #endif
va009039 0:1ed23ab1345f 58
va009039 0:1ed23ab1345f 59 #endif