aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/usb_serial.cpp
Commit message (Collapse)AuthorAgeFilesLines
* USB: API cleanups.Marti Bolivar2011-10-211-2/+2
| | | | | | | | | | Modify usb.h functions (changing their names in some cases) to also take a usblib_dev* argument, to fit in better with the rest of libmaple. Store an rcc_clk_id in struct usblib_dev for the same reason. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb: Disentangle CDC ACM functionality.Marti Bolivar2011-10-181-9/+10
| | | | | | | | | | | | | | | | | | | | | 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>
* usb: Cleanups and renames.Marti Bolivar2011-10-181-2/+2
| | | | | | | | | Rename setupUSB() and disableUSB() to usb_cdcacm_enable() and usb_cdcacm_disable(), respectively. Remove usbSendHello(). This shouldn't exist. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb: Move some board-specific configuration to Wirish.Marti Bolivar2011-10-181-2/+2
| | | | | | | | | Create new BOARD_USB_DISC_DEV and BOARD_USB_DISC_BIT board-specific values. Use these as arguments to setupUSB() and disableUSB(). This helps make the USB stack more generic, and goes towards the resolution of an important FIXME. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* SerialUSB fixups.Marti Bolivar2011-05-041-74/+43
|
* Fixing USBSerial::read(void*, uint32).Marti Bolivar2011-05-041-3/+3
|
* fixed broken build from usb_serial.cppAJM2010-12-131-2/+2
| | | | oops
* made SerialUSB.read blockingAJM2010-12-131-2/+12
| | | | it should have been blocking before but wasnt. see bug #49
* more sphinx docsMarti Bolivar2010-10-111-0/+2
|
* wirish reformatted and code-styledMarti Bolivar2010-09-261-17/+24
|
* last usbserial change... please?bnewbold2010-07-221-3/+12
|
* added isConnected() to serialusbbnewbold2010-07-221-0/+12
|
* went with 50ms SerialUSB timeoutbnewbold2010-07-201-1/+1
|
* working serialUSB with timeoutbnewbold2010-07-191-5/+38
| | | | | | | | | | | as a temporary workaround for the fact that SerialUSB is often blocking, this crude implementation makes the low-level C usbSendBytes function non-blocking (with a return code of bytes sent) and implements a 2ms timeout in the wirish write() function. also adds begin(), end(), getDTR(), getRTS(), pending(). device is still initialized the old fashioned way during init() so that, eg, autoreset will work. includes a simple multi-test program.
* added getDTR and getRTS to usb.h, subtly modded how sendBytes checks for ↵AJM2010-06-111-1/+2
| | | | | | connection flip flopped back and forth on how much work should be done here. For now its like 5 lines of changes
* USB Serial read() fix:Perry Hung2010-06-051-1/+2
| | | | stupid, stupid mistake.
* Preliminary wirish USBSerial implementation.Perry Hung2010-06-041-0/+72
-updated examples -removed HardwareUSB -cleaned up a handful of includes