aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/usb/usb_callbacks.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: Disentangle CDC ACM functionality.Marti Bolivar2011-10-181-352/+0
| | | | | | | | | | | | | | | | | | | | | 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: Remove usbPowerOff(), move usbPowerOn() to usb_callbacks.c.Marti Bolivar2011-10-181-0/+15
| | | | | | | | | | | Remove usbPowerOn(), usbPowerOff() prototypes from usb.h. These aren't used outside of the USB subsystem, so they don't belong here. Move usbPowerOn() from usb.c to usb_callbacks.c. This is the only place where it's used. Remove the unused usbPowerOff() (from usb.c) altogether. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Remove usb_hardware.c and usb_hardware.h.Marti Bolivar2011-10-181-1/+4
| | | | | | | These files contain a lot of duplicated and unused code. Move the relevant pieces that need to survive into usb.c and usb_callbacks.c. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb: Replace duplicated code with nvic.h API.Marti Bolivar2011-10-181-1/+3
| | | | | | | | | Replace calls to usbEnbISR()/usbDsbISR() with nvic_irq_enable()/nvic_irq_disable(). Remove ST-style code. Use nvic_sys_reset() instead of systemHardReset(). Rename some conflicting #defines that including nvic.h created. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Missed one hard-coded structure size.RJ Ryan2011-09-181-1/+1
| | | | Signed-off-by: RJ Ryan <rryan@mit.edu>
* libmaple: Fix warnings in libmaple source filesPerry Hung2011-05-121-2/+2
| | | | | -Add -Wall, -Werror to libmaple/* -Fix warnings
* [WIP] GPIO refactor: seems ok, ready for reviewMarti Bolivar2011-03-111-1/+1
|
* Merge branch 'master' into debug-serialusb.Marti Bolivar2010-12-211-196/+194
|\ | | | | | | | | | | | | Chose debug-serialusb version in cases of conflict. Conflicts: libmaple/usb/usb_callbacks.c
| * Finished converting the Arduino docsMarti Bolivar2010-11-291-234/+234
| |
* | changed the serialusb to be simplest possible designAJM2010-12-141-26/+4
| | | | | | | | no longer use a ring buffer. No longer double buffer a local rx buffer and the packet memory. Instead, we read out of packet memory and block it for all reads. This is going to be slower. but it tests OK (unlike the old one...).
* | enlarged rx buffer and nak when less than 64 bytes is left in packet bufAJM2010-12-131-11/+12
| |
* | candidate bugfix for serialusb receive bugAJM2010-12-131-2/+6
|/ | | | changed USB driver to nak whenever it cant fill an entire endpoint (64B) worth of new data. The old scheme was to set receive valid as long as as the endpoint buffer wasnt full, the new scheme is to nak until it is completely empty.
* added a somewhat broken version of the reset magic number scheme.AJM2010-06-091-67/+81
| | | | current version gets stuck in the isr somewhere. not sure why or where. must debug.
* first approach at modding the reset schemeAJM2010-06-091-0/+44
| | | | now we reset from recv bytes. After receiving the DTR/RTS toggle the next byte in from usb is parsed as the program_delay. For now, this just delays the reset for a period to close the serial port gracefully. Later, this delay will perhaps inform the bootloader of how long to live for...
* Preliminary wirish USBSerial implementation.Perry Hung2010-06-041-4/+4
| | | | | | -updated examples -removed HardwareUSB -cleaned up a handful of includes
* moved the usb directory to its proper home in ./libmapleAJM2010-05-201-0/+293
also, removed some old usb file, bootVect.h, which setup the static table for the runtime usb lib that no longer exists and was provided by the bootloader rev 1