Commit graph

1510 commits

Author SHA1 Message Date
bunnie
ffbfa1dc3f wooooo i spy with my little eye an emulated HID keyboard 2022-05-16 13:15:21 +08:00
bunnie
2b57fa559d use Cargo patches so we can target our branch of usb-device
we have to add a patch to usb-device because the SpinalHDL UDC
needs a little extra handholding on EP0 to switch IN and OUT modes
(vs e.g. STM32 where EP0 has IN and OUT descriptors).
2022-05-16 03:09:28 +08:00
bunnie
874c4d41ff well, it's enumerating. now what? 2022-05-16 02:49:23 +08:00
bunnie
77038737b2 just before attempting to use IN to linked list trick 2022-05-16 00:34:14 +08:00
bunnie
26739472af this requires an adjustment to the SoC, but now we're seeing half the setup
a small bug was found in the device core that is now fixed. the
device core was not computing the target for the SETUP transaction
correctly if the HEAD of the OUT descriptor was set in advance of
the SETUP transaction. we now see much more consistent SETUP
transactions, and even the first IN response.

the next challenge is figuring out why the second IN response doesn't
seem to be issued.
2022-05-15 14:11:14 +08:00
bunnie
8c39b64126 getting closer...
we're now two packets into the setup.

i think i see one fundamental mismatch between how the driver
behaves and how the hardware runs. it has to do with where the
ep0 data gets deposited for a SETUP or OUT transaction --
the HEAD of the list can't be allocated the transaction is
completely ready to go.

will bang on this more tomorrow, but this is progress at least.
2022-05-15 02:16:24 +08:00
bunnie
bd1cc10678 refactor code base after a slightly better understanding of the USB core
still one mystery remaining, howcome setup packets don't "stick"
the first time around...
2022-05-14 23:53:10 +08:00
bunnie
0dadc32716 fix interrupts, direction
interrupts seem to behave much more like i think they should.
i think the interrupt unit on the spinalHDL block is not made to
have the whole set enabled/disabled frequently, it just wants
to have the bits banged to clear the interrupts. enabling and
disabling interrupts as a whole causes some erratic operations.
NB: the reference linux driver only enables them once and never
turns them off.

also, realized just now that OUT is from the direction of the host.
so OUT on the device is incoming data. oops.

things are moving in the right direction, i'm seeing the next
IN packet being issued by the USB driver on the precursor
side, but it's not being sent by the hardware. yet.
2022-05-13 23:44:15 +08:00
bunnie
adf8eb6519 some progress .. seeing setup packets now 2022-05-10 13:24:08 +08:00
bunnie
6b04f0e73c fix missing pullup bit, required for core to operate correctly
even though it's not hooked up externally, it affects the internal
logic somehow?
2022-05-09 21:10:34 +08:00
bunnie
047b9e539d refactor of usb hardware drivers
- write only u32s to registers
- make everything volatile
2022-05-09 10:04:59 +08:00
bunnie
8310d64de9 layer in the HID keyboard drivers 2022-05-07 13:21:23 +08:00
bunnie
15d16ab490 add warnings to remind about moving USB disable to the usbdev server once it's possible 2022-05-06 13:40:32 +08:00
bunnie
bee8334b3b flesh out usb driver 2022-05-06 13:40:12 +08:00
bunnie
709c087337 refactor wait timer for net pump 2022-05-06 13:35:33 +08:00
bunnie
9354932483 fix buffer length check computation 2022-05-06 13:34:59 +08:00
bunnie
382f2ae306 fix warning 2022-05-06 04:00:55 +08:00
bunnie
2a4dd67564 hoist net thread exhaustion check to before we check the poll interval 2022-05-06 04:00:20 +08:00
bunnie
fd2aa438c0 still struggling a bit to get basic USB connectivity test to pass 2022-05-05 20:51:48 +08:00
bunnie
3133d386c4 cleanup type problems incurred while fixing +Send trait on core types 2022-05-03 01:13:24 +08:00
bunnie
322de782d7 ensure all allocs meet the 16-byte alignment criteria 2022-05-02 23:15:52 +08:00
bunnie
c12d9cbe8f working through the usb endpoint descriptor allocator 2022-05-02 22:59:33 +08:00
bunnie
467254fa81 lay down some initial data structures to talk to the UDC 2022-04-27 02:41:07 +08:00
bunnie
a7684343f2 add first commands to toggle core connectivity 2022-04-27 01:22:53 +08:00
bunnie
5f2eef3afd initial toy repl for usb debugging 2022-04-27 00:53:58 +08:00
bunnie
9768503087 Merge branch 'main' into usbdev 2022-04-25 18:44:37 +08:00
bunnie
33a3cfa7c2 fix typo 2022-04-25 18:34:31 +08:00
bunnie
a9b2dd535a add a note to remind about the purpose of the unsub test command 2022-04-25 18:32:09 +08:00
bunnie
d23dbd1db8 add an explicit test of the unsub path
normally you would never use this, this would cause the
connection manager to muck up.
2022-04-25 18:30:43 +08:00
bunnie
969b4ec868 refactor net firewall to use .forward() method 2022-04-25 18:30:24 +08:00
bunnie
8d28f130ea fix a missing case for hardware not caught by hosted mode 2022-04-24 21:53:18 +08:00
bunnie
f8246b14f5 run rustfmt on the modals crate 2022-04-24 21:40:42 +08:00
bunnie
547783d195
Merge pull request #150 from nworbnhoj/qrcode
enable notification modal text + qrcode
2022-04-24 21:36:38 +08:00
bunnie
62d56fb70b
Merge pull request #149 from nworbnhoj/index
modal selected index support
2022-04-24 21:27:08 +08:00
nworbnhoj
0e561802ce enable notification modal text + qrcode
change the notification modal to accept the primary message and an
Option of independent text to display as a qrcode

pub fn show_notification(&self, notification: &str, qrtext:Option<&str>) -> Result<(), xous::Error> {}
2022-04-24 21:29:15 +10:00
nworbnhoj
2070236695 minor refinements requested on PR 2022-04-24 20:09:43 +10:00
nworbnhoj
e879ff4b17 modal selected index support
Support for:
- obtaining the index of the selected radiobutton & checkbox
- adding a Vec<&str> of items
2022-04-24 08:28:02 +10:00
bunnie
ce5a81878c fix for issue #145 2022-04-24 00:16:27 +08:00
Sean Cross
f0f1b72e0c log-server: refactor to use stack-allocated buffers
Instead of having a single, shared buffer, simply stack-allocate the log
buffers.

This paves the way in the future to allow for buffers that are
larger-sized and span multiple pages. But most importantly it alleviates
inter-thread locking and contention when passing messages.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-23 12:46:20 +08:00
Sean Cross
234c169809 log-server: allow maximum-length buffers to be printed
Previously, we would reject buffers that were the maximum allowed size.
This is reported in #141.

Allow these maximally-sized buffers to be printed, since they don't end
up causing a problem.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-23 12:45:27 +08:00
bunnie
8d0e3e6958 Merge branch 'main' into usbdev 2022-04-22 19:41:03 +08:00
bunnie
987f40f5de minor fixes to multi-modals input
- track field heights using the drawing height directly
- use an &mut reference in the text processing section so changes stick
- other minor cosmetic improvements
2022-04-22 17:44:25 +08:00
bunnie
34c2ffe1a3 fix password entry to work with the new return type
also requires a call to `reset_action_payloads` for the
number of field elements to be recorded correctly!
2022-04-22 17:43:26 +08:00
bunnie
55197e97f4 fix white space 2022-04-22 15:56:11 +08:00
bunnie
4ddd414ed6 fix modals API in the PDDB migration code 2022-04-22 15:55:15 +08:00
bunnie
dd462aebb2 remove trailing/open white spaces 2022-04-22 15:54:43 +08:00
bunnie
2c3143f790 Merge branch 'main' into multi-text-modals 2022-04-22 15:54:18 +08:00
bunnie
bac6c25bfe conversion toward standard testing method 2022-04-22 15:10:51 +08:00
bunnie
c3e5b23dd3 Merge branch 'main' into usbdev 2022-04-21 17:56:28 +08:00
bunnie
012a4d4673
Merge pull request #138 from vmedea/minifb-0.23
Update minifb to 0.23.0
2022-04-20 20:19:09 +02:00