diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-09-23 17:56:24 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-10-18 13:30:18 -0400 |
commit | bbcbf65fd7d074268f4e25ae014965bceb995b79 (patch) | |
tree | d027563c1d4b860d3e77119ee26f75943ced80a2 /libmaple/usb/README | |
parent | 2e392bbf59c4c746714d71c99757f02da4c57179 (diff) | |
download | librambutan-bbcbf65fd7d074268f4e25ae014965bceb995b79.tar.gz librambutan-bbcbf65fd7d074268f4e25ae014965bceb995b79.zip |
usb: Disentangle CDC ACM functionality.
Add new usb_cdcacm.h, which provides the virtual serial port API.
This file (and new usb_cdcacm.c) consolidate the VCOM support, which
was previously distributed through descriptors.[hc], usb.[hc],
usb_callbacks.[hc], and usb_config.h.
Add usb_init_usblib() to usb.h, as a way of initializing the USB
peripheral in terms of the data structures required by usb_lib. This
is used by the new usb_cdcacm_enable().
Create new usb_lib_globals.h, with declarations for the usb_lib global
state which is most used throughout the rest of the libmaple USB stack.
Remove descriptors.c and usb_callbacks.[hc]; they are no longer
necessary.
Update the USB README accordingly.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/usb/README')
-rw-r--r-- | libmaple/usb/README | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/libmaple/usb/README b/libmaple/usb/README index 2862116..2c55364 100644 --- a/libmaple/usb/README +++ b/libmaple/usb/README @@ -2,28 +2,22 @@ The USB submodule of libmaple is responsible for: Initializing the USB peripheral, scaling the peripheral clocks appropriately, enabling the interrupt channels to USB, defining - the USB isr, resetting the USB disc pin (used to tell the host + the USB IRQ, resetting the USB DISC pin (used to tell the host were alive). Additionally, the USB submodule defines the virtual - com port USB applications that is available to all user sketches - via SerialUSB.print() and others. + COM port interface that is exposed to user sketches via SerialUSB. To use it: - [This section is out of date. Does SerialUSB.begin() do the same - thing as the old Usb.init()?] - SerialUSB.print/ln, available(), read(), write() implement the same - interface as Serial1/2/3 - + interface as Serial1/2/3. Current Status: Currently, the USB submodule relies on the low level core library - provided by ST to access the USB peripheral registers and - implement the USB transfer protocol for control endpoint - transfers. The high level virtual com port application is - unfortunately hard to untangle from this low level dependence, and - when a new USB core library is written (to nix ST dependence) + provided by ST to implement the USB transfer protocol for control + endpoint transfers. The high level virtual com port application + is unfortunately hard to untangle from this low level dependence, + and when a new USB core library is written (to nix ST dependence) changes will likely have to be made to virtual com application code. Ideally, the new core library should mimic the form of MyUSB (LUFA), since this library (USB for AVR) is growing in popularity @@ -66,9 +60,6 @@ Current Status: be asserted (on Maple this is GPIO C12). Alternatively, the NVIC can be directly configured to disable the USB LP/HP IRQ's. - This library should exposed through usb.h; do not include any - other files direcly in your application. - The files inside of usb_lib were provided by ST and are subject to their own license, all other files were written by the LeafLabs team and fall under the MIT license. |