Commit graph

10340 commits

Author SHA1 Message Date
bunnie
a468733ea6 Merge branch 'automation' into bunnie-dev 2022-05-24 16:58:55 +08:00
bunnie
6e61405609 update release notes 2022-05-24 16:58:21 +08:00
bunnie
5815eae023 restore the security check around recalculatesleep 2022-05-24 16:28:16 +08:00
bunnie
bdc43a5190 Merge branch 'bunnie-dev' into main 2022-05-24 16:18:50 +08:00
nworbnhoj
f19b2ac939 implement auto size rotate & center for Image Modal 2022-05-24 12:08:07 +10:00
bunnie
4d1d132233 add a first-pass at what hardware CI automation strings might look like 2022-05-24 02:22:36 +08:00
bunnie
d2a3b252f0 potential fix for #162
see issue for discussion
2022-05-23 12:08:11 +02:00
bunnie
8221f92d95 potential fix for #162
see issue for discussion
2022-05-23 17:30:02 +08:00
bunnie
d6d5c89746 add facility to help debug stalled suspend/resume 2022-05-23 13:50:52 +08:00
bunnie
058e3480df add facility to help debug stalled suspend/resume 2022-05-23 13:50:40 +08:00
bunnie
424f8feab7 advance timer state by +1 ms on suspend to avoid double-interrupts on resume
Issue #159 may be caused by queueing a connection to respond to when
the timer expires, but if the timer expires twice then it tries to
respond to a null connection id.

And if it goes to suspend in the same millisecond as it services the
condvar, then it'll reissue the interrupt when it comes back from
suspend.
2022-05-23 13:50:30 +08:00
nworbnhoj
5952f80763 add missing modal image.rs 2022-05-22 22:06:55 +10:00
nworbnhoj
ba1f9d017a exclude troublesome features from dither crate 2022-05-22 14:17:11 +10:00
nworbnhoj
345659be44 replace cast with try_into in graphics-server api shapes 2022-05-22 10:30:05 +10:00
bunnie
4931e00d60 advance timer state by +1 ms on suspend to avoid double-interrupts on resume
Issue #159 may be caused by queueing a connection to respond to when
the timer expires, but if the timer expires twice then it tries to
respond to a null connection id.

And if it goes to suspend in the same millisecond as it services the
condvar, then it'll reissue the interrupt when it comes back from
suspend.
2022-05-21 11:48:54 +02:00
nworbnhoj
7f66291a38 implement Image modal
Now you can:
let mut input = std::env::current_dir().unwrap();
input.push("../services/modals/src/tests/bunny.png");
let img = Img::<RGB<u8>>::load(&input).unwrap();
modals.show_image(img).expect("image failed");
2022-05-21 06:42:27 +10:00
bunnie
ed16fc1b2f advance timer state by +1 ms on suspend to avoid double-interrupts on resume
Issue #159 may be caused by queueing a connection to respond to when
the timer expires, but if the timer expires twice then it tries to
respond to a null connection id.

And if it goes to suspend in the same millisecond as it services the
condvar, then it'll reissue the interrupt when it comes back from
suspend.
2022-05-21 01:34:35 +08:00
Gianguido Sorà
9b58fc6bf8 first somewhat working code 2022-05-20 12:40:32 +02:00
nworbnhoj
11f6fb4aeb implement gam bitmap (dither)
This enables

let mut input = std::env::current_dir().unwrap();
input.push("bunny.png");
let mut bm = Bitmap::from(Img::<RGB<u8>>::load(&input).unwrap());
bm.translate(Point::new(10,100));
gam.draw_bitmap(self.gid, bm);
2022-05-18 22:12:53 +10:00
nworbnhoj
61d6a4b853 implement graphics-server Tile 2022-05-18 18:27:30 +10:00
bunnie
3bfdc238a0 add support for keymaps in HID
remaps keys based on the assumed keymap based on the user's
preference for the keyboard layout on the device.

So far, only dvorak and QWERTY are supported.
2022-05-17 16:41:08 +08:00
bunnie
7112b6a15f add a script to help extract keyboard mappings for unknown keyboards
use `usb kbdtest` to output a mapping assuming US-101 maps
it will then derive an appropriate keymap based on that mapping

doesn't support non-ascii characters (yet)
2022-05-17 16:39:48 +08:00
bunnie
4cba739a81 remove improper warning message
this was a vestige of an earlier version that should have been
removed
2022-05-17 03:13:19 +08:00
bunnie
b69fbfdd01 adjust keyboard emulation delays for better compatibility 2022-05-17 03:08:08 +08:00
bunnie
4a23cf671d fix hosted mode MAC address 2022-05-17 03:07:56 +08:00
bunnie
ca275308ef Merge branch 'usbdev' into main 2022-05-17 02:31:10 +08:00
bunnie
03a191d182 adjust IP targets on helper scripts 2022-05-17 02:27:04 +08:00
bunnie
ec53be0ac7 add USB device checkup functions and fix hosted mode 2022-05-17 02:26:28 +08:00
bunnie
66e4d9f803 move test commands for USB status checkup from keys to USB 2022-05-17 02:25:59 +08:00
bunnie
c7f9688b5f have status point to the USB crate for USB checkup 2022-05-17 02:25:44 +08:00
bunnie
78611f97c4 remove USB checkup functions from LLIO crate 2022-05-17 02:25:28 +08:00
bunnie
346caad315 Add the usb-device-xous driver to the default hardware config
Also includes the USB test commands in shellchat.

This is different from the usb-test crate, in that it's fully
integrated into Xous. usb-test is just for quick-testing the USB
driver, in the absence of most of the rest of Xous.
2022-05-17 00:46:52 +08:00
bunnie
3f779d5def tweak delays for more consistent key down reporting 2022-05-16 21:43:24 +08:00
bunnie
71f5183766 working USB development demo (HID keyboard emulation) 2022-05-16 21:26:37 +08:00
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
45c4d6320c bug fixes for SpinalHDL core (EP0 setups now go to the correct location) 2022-05-16 00:34:42 +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
4f36027974
Merge pull request #157 from gsora/gsora/modals-time-crash-fix
fix: clamp TextEntryPayloads content slice to the real amount of fields used in the modal
2022-05-14 02:59:34 -07:00
Gianguido Sorà
dbff05d1f2 fix: clamp TextEntryPayloads content slice to the real amount of fields used in the modal 2022-05-14 11:49:15 +02:00
Gianguido Sorà
cb2a3b442d intermediate commit 2022-05-14 11:17:26 +02: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
9a11056340
Merge pull request #154 from NicolasDorier/patch-1
Fix link in repl demo
2022-05-13 00:18:22 -07:00
bunnie
e9b627cab8 update release notes, clean up Cargo.toml, smoltcp to 0.8.1
smoltcp gave us a patch for our smoltcp issues! thank you @dirbaio!
2022-05-13 15:09:45 +08:00
bunnie
3664331b2f update release notes 2022-05-13 14:53:23 +08:00
bunnie
4ec84bf4dc implement deferred close on drop for TcpStream
streams are not closed until the txbuffer is empty
2022-05-13 14:51:07 +08:00