うおーるぼっとをiPhoneでコントロールするプログラムです。 iPhoneとはBTLEで接続しています。
Dependencies: FatFileSystem HighSpeedAnalogIn TB6612FNG2 mbed
usb/usb_mem.h@0:373bcb197dc8, 2013-05-10 (annotated)
- Committer:
- jksoft
- Date:
- Fri May 10 11:48:07 2013 +0000
- Revision:
- 0:373bcb197dc8
?????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:373bcb197dc8 | 1 | /* |
jksoft | 0:373bcb197dc8 | 2 | Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com) |
jksoft | 0:373bcb197dc8 | 3 | |
jksoft | 0:373bcb197dc8 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy |
jksoft | 0:373bcb197dc8 | 5 | of this software and associated documentation files (the "Software"), to deal |
jksoft | 0:373bcb197dc8 | 6 | in the Software without restriction, including without limitation the rights |
jksoft | 0:373bcb197dc8 | 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
jksoft | 0:373bcb197dc8 | 8 | copies of the Software, and to permit persons to whom the Software is |
jksoft | 0:373bcb197dc8 | 9 | furnished to do so, subject to the following conditions: |
jksoft | 0:373bcb197dc8 | 10 | |
jksoft | 0:373bcb197dc8 | 11 | The above copyright notice and this permission notice shall be included in |
jksoft | 0:373bcb197dc8 | 12 | all copies or substantial portions of the Software. |
jksoft | 0:373bcb197dc8 | 13 | |
jksoft | 0:373bcb197dc8 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
jksoft | 0:373bcb197dc8 | 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
jksoft | 0:373bcb197dc8 | 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
jksoft | 0:373bcb197dc8 | 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
jksoft | 0:373bcb197dc8 | 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
jksoft | 0:373bcb197dc8 | 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
jksoft | 0:373bcb197dc8 | 20 | THE SOFTWARE. |
jksoft | 0:373bcb197dc8 | 21 | */ |
jksoft | 0:373bcb197dc8 | 22 | |
jksoft | 0:373bcb197dc8 | 23 | #ifndef USB_MEM_H |
jksoft | 0:373bcb197dc8 | 24 | #define USB_MEM_H |
jksoft | 0:373bcb197dc8 | 25 | |
jksoft | 0:373bcb197dc8 | 26 | #ifdef __cplusplus |
jksoft | 0:373bcb197dc8 | 27 | extern "C" { |
jksoft | 0:373bcb197dc8 | 28 | #endif |
jksoft | 0:373bcb197dc8 | 29 | |
jksoft | 0:373bcb197dc8 | 30 | typedef unsigned char byte; |
jksoft | 0:373bcb197dc8 | 31 | |
jksoft | 0:373bcb197dc8 | 32 | void usb_mem_init(); |
jksoft | 0:373bcb197dc8 | 33 | |
jksoft | 0:373bcb197dc8 | 34 | volatile byte* usb_get_hcca(); |
jksoft | 0:373bcb197dc8 | 35 | |
jksoft | 0:373bcb197dc8 | 36 | volatile byte* usb_get_ed(); |
jksoft | 0:373bcb197dc8 | 37 | |
jksoft | 0:373bcb197dc8 | 38 | volatile byte* usb_get_td(uint32_t endpoint); |
jksoft | 0:373bcb197dc8 | 39 | volatile byte* usb_get_itd(uint32_t endpoint); |
jksoft | 0:373bcb197dc8 | 40 | |
jksoft | 0:373bcb197dc8 | 41 | volatile byte* usb_get_bp(int size); |
jksoft | 0:373bcb197dc8 | 42 | int usb_bp_size(); |
jksoft | 0:373bcb197dc8 | 43 | |
jksoft | 0:373bcb197dc8 | 44 | void usb_free_ed(volatile byte* ed); |
jksoft | 0:373bcb197dc8 | 45 | |
jksoft | 0:373bcb197dc8 | 46 | void usb_free_td(volatile byte* td); |
jksoft | 0:373bcb197dc8 | 47 | |
jksoft | 0:373bcb197dc8 | 48 | void usb_free_itd(volatile byte* itd); |
jksoft | 0:373bcb197dc8 | 49 | |
jksoft | 0:373bcb197dc8 | 50 | void usb_free_bp(volatile byte* bp); |
jksoft | 0:373bcb197dc8 | 51 | |
jksoft | 0:373bcb197dc8 | 52 | bool usb_is_td(volatile byte* td); |
jksoft | 0:373bcb197dc8 | 53 | bool usb_is_itd(volatile byte* td); |
jksoft | 0:373bcb197dc8 | 54 | |
jksoft | 0:373bcb197dc8 | 55 | #ifdef __cplusplus |
jksoft | 0:373bcb197dc8 | 56 | } |
jksoft | 0:373bcb197dc8 | 57 | #endif |
jksoft | 0:373bcb197dc8 | 58 | |
jksoft | 0:373bcb197dc8 | 59 | #endif |