USB Device ROM Stack API example program
LPC1549のROM APIを使ったRAMディスクです。PCからはUSBメモリとして見えます。
参考:
http://docs.lpcware.com/usbromlib/v1.0/
rl_usb.h@0:ef2c0c52abc4, 2014-03-14 (annotated)
- Committer:
- va009039
- Date:
- Fri Mar 14 09:14:16 2014 +0000
- Revision:
- 0:ef2c0c52abc4
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:ef2c0c52abc4 | 1 | /* CMSIS-DAP Interface Firmware |
va009039 | 0:ef2c0c52abc4 | 2 | * Copyright (c) 2009-2013 ARM Limited |
va009039 | 0:ef2c0c52abc4 | 3 | * |
va009039 | 0:ef2c0c52abc4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
va009039 | 0:ef2c0c52abc4 | 5 | * you may not use this file except in compliance with the License. |
va009039 | 0:ef2c0c52abc4 | 6 | * You may obtain a copy of the License at |
va009039 | 0:ef2c0c52abc4 | 7 | * |
va009039 | 0:ef2c0c52abc4 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
va009039 | 0:ef2c0c52abc4 | 9 | * |
va009039 | 0:ef2c0c52abc4 | 10 | * Unless required by applicable law or agreed to in writing, software |
va009039 | 0:ef2c0c52abc4 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
va009039 | 0:ef2c0c52abc4 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
va009039 | 0:ef2c0c52abc4 | 13 | * See the License for the specific language governing permissions and |
va009039 | 0:ef2c0c52abc4 | 14 | * limitations under the License. |
va009039 | 0:ef2c0c52abc4 | 15 | */ |
va009039 | 0:ef2c0c52abc4 | 16 | #ifndef __RL_USB_H__ |
va009039 | 0:ef2c0c52abc4 | 17 | #define __RL_USB_H__ |
va009039 | 0:ef2c0c52abc4 | 18 | |
va009039 | 0:ef2c0c52abc4 | 19 | #ifdef __cplusplus |
va009039 | 0:ef2c0c52abc4 | 20 | extern "C" { |
va009039 | 0:ef2c0c52abc4 | 21 | #endif |
va009039 | 0:ef2c0c52abc4 | 22 | |
va009039 | 0:ef2c0c52abc4 | 23 | #include <stdint.h> |
va009039 | 0:ef2c0c52abc4 | 24 | #include "usb.h" |
va009039 | 0:ef2c0c52abc4 | 25 | |
va009039 | 0:ef2c0c52abc4 | 26 | /***************** Functions *************************************************/ |
va009039 | 0:ef2c0c52abc4 | 27 | |
va009039 | 0:ef2c0c52abc4 | 28 | /* USB Device functions exported from USB Device Core module */ |
va009039 | 0:ef2c0c52abc4 | 29 | extern void usbd_init (void); |
va009039 | 0:ef2c0c52abc4 | 30 | extern void usbd_connect (uint8_t con); |
va009039 | 0:ef2c0c52abc4 | 31 | |
va009039 | 0:ef2c0c52abc4 | 32 | /* USB Device user functions imported to USB Mass Storage Class module */ |
va009039 | 0:ef2c0c52abc4 | 33 | extern void usbd_msc_init (void); |
va009039 | 0:ef2c0c52abc4 | 34 | extern void usbd_msc_read_sect (uint32_t block, uint8_t *buf, uint32_t num_of_blocks); |
va009039 | 0:ef2c0c52abc4 | 35 | extern void usbd_msc_write_sect (uint32_t block, uint8_t *buf, uint32_t num_of_blocks); |
va009039 | 0:ef2c0c52abc4 | 36 | |
va009039 | 0:ef2c0c52abc4 | 37 | #ifdef __cplusplus |
va009039 | 0:ef2c0c52abc4 | 38 | } |
va009039 | 0:ef2c0c52abc4 | 39 | #endif |
va009039 | 0:ef2c0c52abc4 | 40 | |
va009039 | 0:ef2c0c52abc4 | 41 | #endif /* __RL_USB_H__ */ |