| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
uint16 is the wrong type for the bString array.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
| |
These form and name of structs etc. is basically determined by the USB
spec and the libmaple style guide, so there's little reason for them
to change, and less reason for them to stay hidden.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just change names and things to fit the libmaple style. Its contents
will move to the top-level <libmaple/usb.h> header next.
This API is still unstable, but we need to expose pieces of it in
order to get the Maple-specific pieces of usb_cdcacm.c into Wirish.
Adjust uses of the API appropriately.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
| |
This was already supported, so just move the line coding structure to
the header and add some functions for accessing the current values.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
Fixes an (admittedly very unlikely) race condition.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We definitely need to mask out the high bits, as RM0008 doesn't
specify that they read as zero. Calling this function seems to crash
the board, though. I'm not sure why, especially since
usb_set_ep_tx_count(), used by usb_cdcacm.c, seems to work.
Confusing.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
| |
Mark internal state static. Properly reset the RX/TX state on USB
reset. Choose better names for countTx and newBytes.
Move the exposed configuration back into the .c; this information is
not beneficial to hooks.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
| |
Actually fill the TX buffer in the packet memory area, so we can send
more bytes per transaction. Using the test-session benchmark, we're
now clocking in the high 700KB/sec range via PySerial. With screen,
rate is now about 550 KB/sec.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
| |
I'm currently measuring over 500 KB/sec with screen as my serial
monitor. If I don't display the output at all, I get over 600
KB/sec. Nice!
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
| |
Rename USB_Line_Coding to usb_line_coding, and rename its fields to
match the spec to aid searches. Alter the line_coding global to match,
fixing an incorrect comment and avoiding magic numbers.
Other minor fixups and comment improvements.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
This keeps things in line with the specification, helping readability.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
Finally!
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
| |
This makes the HardwareSerial behavior match that of SerialUSB, and
should help avoid confusion.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
| |
Use usb_cdcacm hooks to move the DTR edge and "1EAF" magic packet
detection to usb_serial.cpp. We'll later be able to extend this system
to support Leonardo-style reset signalling.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We need this so the bootloader reset signal detector can look ahead in
the byte stream without stealing bytes from the user when "1EAF" isn't
received.
While we're doing this, take the time to fix a bunch of RX-related
code (dead code removal, adding volatile, etc.)
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
Sigh.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
| |
Provide hooks so users can reach into the CDC ACM callbacks with their
own code. We'll use this to move the bootloader reset signals to
Wirish.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
| |
Mark the API as unstable so people don't rely on these too hard. (This
header is not part of the official libmaple docs). We'll need some of
this configuration elsewhere later, and it doesn't make much sense to
expose it piecemeal.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
| |
Not sure what the comment above the new TODO is supposed to mean, but
it looks like something that should be checked.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
| |
The disc pin code was copy-pasted when the CDC ACM pieces were
extracted from the rest of the USB code, and I didn't really
understand what was going on when I moved it over. Having checked the
spec, the comments can be safely improved.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
| |
The nonexistence of a configuration system is starting to become kind
of a pain. Oh well; let's keep piling hacks on until things break.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
| |
Repeat Anton's VLDiscovery trick on the rest of the boards. Leave out
st_stm3220g_eval since that's just a teaser to get people to play with
F2.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
| |
Move the actual QUIET setting to above mdebug(); that was
confusing. Rename _wait_for_ask to _wait_for_ack.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support the extended erase memory command, which replaced the erase
memory command in the bootloader protocol as of version 3.0. This
takes a long time, so tweak _wait_for_ask to take an extra timeout for
special cases like this.
Use this under if __name__ == '__main__' to support F2 and
F4. Additionally, produce a human-readable report of the target chip
from its chip ID.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
This script is I/O bound.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
Towards py3k compatibility.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
We test on that platform now, and it does work.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@lozenge.(none)>
|
|
|
|
|
|
| |
Also, assert copyright LeafLabs 2012.
Signed-off-by: Marti Bolivar <mbolivar@lozenge.(none)>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@lozenge.(none)>
|
|
|
|
|
|
|
| |
Utility for listing COM ports available on the system. Taken from Eli
Bendersky.
Signed-off-by: Marti Bolivar <mbolivar@lozenge.(none)>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
| |
We're more portable since last writing. We also shamefully ignore the
bugtracker and blocking changes pages, so drop those for now. Other
tweaks and fixups.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
| |
Switch to the new include style. Move includes in headers inside the
include guards, for the GCC multiple include parser optimization. Make
80-column clean. Add newlines at end of files.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Added a generic pure abstract class to provide the interface for all
Wire implementations. Modified the old Wire library using software
interface to use the new Base Wire abstract class. Added a new
library which allows the use of the Wire class to use the I2C
hardware. Changed default pin numbers for Software Wire library to
match pin numbers used for I2C/TWI shields created for the Arduino.
Signed-off-by: Trystan Jones <crenn6977@gmail.com>
|
|
|
|
|
|
|
|
| |
- Shut Doxygen up in various places
- Fix some genuine docs bugs
- Ignore sources we're not responsible for
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
| |
This is an astyle options file that roughly aligns with the coding
style guidelines.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's about time. This initial file is based on the output of
$ git log | grep Author | sort | uniq
It leaves out credit for patches that were later reverted or moved out
of libmaple. It also doesn't credit the many patches and other
bugfixes from users who've e.g. written in the forum describing their
changes, but didn't submit actual patches. Names aren't always
available in cases like those, but if the contributors come forward,
we'd be happy to add them.
Add note in HACKING about adding yourself to CREDITS.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|