aboutsummaryrefslogtreecommitdiff
path: root/stmhal/usbd_cdc_interface.c
AgeCommit message (Collapse)Author
2014-07-31stmhal: Add USB_VCP class/object, for direct USB VCP control.Damien George
Before, pyb.stdin/pyb.stdout allowed some kind of access to the USB VCP device, but it was basic access. This patch adds a proper USB_VCP class and object with much more control over the USB VCP device. Create an object with pyb.USB_VCP(), then use this object as if it were a UART object. It has send, recv, read, write, and other methods. send and recv allow a timeout to be specified. Addresses issue 774.
2014-05-10stmhal: Fix USB CDC not flushing packets when an exact multiple of 64.Damien George
Need to send a zero-sized packet after sending an exact multiple of 64 bytes (not just after sending 64 bytes exactly). Addresses issue #494, part 2.
2014-05-03Add license header to (almost) all files.Damien George
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-04-17stmhal: Fix 64-byte USB packet bug properly.Damien George
A 64-byte packet is now followed by a 0-byte packet if there is nothing more to send. This flushes the USB endpoint.
2014-04-16stmhal: Replace magic number 3 with CDC_IN_EP define.Damien George
2014-04-16stmhal: Fix USB CDC buffer overrun error.Damien George
Need to wait for the low-level USB driver to send the data over the USB in-endpoint before the buffer can be used again. This patch adds a check for this.
2014-04-14stmhal: Work around crazy bug in USB CDC.Damien George
Packets of 64 bytes length are not send to the host until the following packet is sent. Fixed by never sending packets of 64 bytes length.
2014-04-13stmhal: Improve USB CDC write function (increase timeout).Damien George
2014-03-30stmhal: Implement selector for USB device mode; improve boot up.Damien George
Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID. Choice is made by an option in boot.py, with default being CDC+MSC. HID+MSC is not currently supported, but should be easy to implement. Boot up now has ability to change the reset mode: hold down USR switch while booting and LEDs will count from 1 to 7 to indicate the boot mode. Release USR when correct mode is selected. Current modes are 1 (normal boot), 2 (safe mode), 3 (reset FS mode).
2014-03-24stmhal: Fix bug with USB CDC transmit buffer wrap around.Damien George
2014-03-23stmhal: Fix issues with USB CDC init and receive.Damien George
Late USB enumeration could clear settings after they had been set. Now fixed by not clearing some settings on init. RX was blocking if received characters were not being processed, so CTRL-C would not be picked up. Now "fixed" by not blocking, but instead discarding incoming characters if they overflow the buffer.
2014-03-22stmhal: Add intensity method for blue LED.Damien George
As part of this, rejig the way TIM3 is initialised, since it's now shared by USB CDC and the blue LED PWM.
2014-03-22stmhal: Servo driver can move at a given speed.Damien George
2014-03-22stmhal: Tidy up USB CDC+MSC device some more.Damien George
2014-03-22stmhal: Tidy up USB device configuration. Make it use less RAM.Damien George
2014-03-15stmhal: Check CDC tx buffer has free space before filling with data.Damien George
2014-03-15stmhal: Put an array in ROM.Damien George
2014-03-15stmhal: Fix escape sequences in USB CDC input.Damien George
2014-03-15stmhal: Get USB CDC REPL working.Damien George
New USB HAL is quite a bit improved over previous one. Now has better callbacks and flow control. REPL over USB CDC now works as before, except for soft-reset (since USB driver uses malloc...).
2014-03-14stmhal: Get USB enumerating a CDC device.Damien George
Enumerates CDC device over USB, but doesn't transmit/receive yet.