Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FatFileSystem TB6612FNG2 mbed
usb/usb_mem.h@0:de03cbbcd0ff, 2015-11-30 (annotated)
- Committer:
- mbed_Cookbook_SE
- Date:
- Mon Nov 30 09:32:15 2015 +0000
- Revision:
- 0:de03cbbcd0ff
??
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 1 | /* |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 2 | Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com) |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 3 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 5 | of this software and associated documentation files (the "Software"), to deal |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 6 | in the Software without restriction, including without limitation the rights |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 8 | copies of the Software, and to permit persons to whom the Software is |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 9 | furnished to do so, subject to the following conditions: |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 10 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 11 | The above copyright notice and this permission notice shall be included in |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 12 | all copies or substantial portions of the Software. |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 13 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 20 | THE SOFTWARE. |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 21 | */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 22 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 23 | #ifndef USB_MEM_H |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 24 | #define USB_MEM_H |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 25 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 26 | #ifdef __cplusplus |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 27 | extern "C" { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 28 | #endif |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 29 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 30 | typedef unsigned char byte; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 31 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 32 | void usb_mem_init(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 33 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 34 | volatile byte* usb_get_hcca(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 35 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 36 | volatile byte* usb_get_ed(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 37 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 38 | volatile byte* usb_get_td(uint32_t endpoint); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 39 | volatile byte* usb_get_itd(uint32_t endpoint); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 40 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 41 | volatile byte* usb_get_bp(int size); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 42 | int usb_bp_size(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 43 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 44 | void usb_free_ed(volatile byte* ed); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 45 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 46 | void usb_free_td(volatile byte* td); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 47 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 48 | void usb_free_itd(volatile byte* itd); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 49 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 50 | void usb_free_bp(volatile byte* bp); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 51 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 52 | bool usb_is_td(volatile byte* td); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 53 | bool usb_is_itd(volatile byte* td); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 54 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 55 | #ifdef __cplusplus |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 56 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 57 | #endif |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 58 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 59 | #endif |