Commit graph

15 commits

Author SHA1 Message Date
Paul Sokolovsky
bacfe8b822 cmd-keypad: Exit also on key press on serial/USB connection.
"keypad" command so far assumes rather adhoc keyboard map, and effectively
locks up otherwise. Allow to break out of it from host connection.
2015-04-02 13:35:34 +03:00
Sean Cross
7d07f8a2f0 serial: Formatting cleanup of old cruft
Remove unreachable code paths and awkward code comments.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-03-11 15:03:24 +08:00
Sean Cross
1dc8e8c573 serial: Limit USB fifo to 1 byte
There is some racy condition where multiple bytes can cause a deadlock.
Until this is figured out, limit the FIFO to 1 byte.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-03-11 15:00:26 +08:00
Sean Cross
9759e98747 serial: Refactor slightly to improve throughput
It's unclear whether this refactor improves things at all, but it's
still limited to 32-byte buffers.  Still, it results in less code,
which seems like a good thing.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-05 15:50:28 +08:00
Sean Cross
1023337c61 serial: Use the USB FIFO
We now use 32 bytes of the USB FIFO to increase performance with bulk
operations.

There may still be issues lurking, and 64-bytes causes issues, but so
far I've been able to read the entire SPI in 30 seconds, and it validates.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-05 01:08:40 +08:00
Sean Cross
70140aa665 serial: Fix serial driver
The serial driver was having issues reading data.  This commit makes
the serial driver more robust.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-04 21:05:03 +08:00
Sean Cross
1602ba550c serial: Fix USB data receive
Due to a typo, USB receive was unreliable.  This patch corrects a typo
that was causing USB receive to fail on certain devices.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2015-02-03 15:01:01 +08:00
Sean Cross
ae59347cd1 serial: Add \r when \n is printed
Signed-off-by: Sean Cross <xobs@kosagi.com>
2014-12-30 17:53:16 +08:00
Sean Cross
b4232c3641 serial: Disable optimization to fix code
Building with -O2 or -Os causes serial to not work.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2014-12-30 17:14:11 +08:00
Sean Cross
a15a05f074 serial: Fix up host timing
The USB device was triggering bugs in the Linux USB stack.  Possibly
a queueing issue, I'm not sure.  The end result was corruption in audio
playback, probably due to DMA timing issues.

Signed-off-by: Sean Cross <xobs@kosagi.com>
2014-12-02 13:44:24 +08:00
Sean Cross
7e6500a28e main: Add firmware load/jump 2014-09-19 16:10:34 +08:00
Sean Cross
6a4fe44cd5 serial: Enable USB serial mode 2014-09-09 14:02:17 +08:00
Sean Cross
afefdde334 serial: Use const void * everywhere
Buffers should be stored in read-only areas of memory.
2014-08-19 15:54:15 +08:00
Sean Cross
9470228966 fernly: More blocks discovered 2014-06-13 17:00:11 +08:00
Sean Cross
685824f56e fernly: Initial commit
This is an initial commit of the code.  It just does prints "Hello, world!"
2014-06-12 12:58:06 +08:00