Commit graph

3370 commits

Author SHA1 Message Date
bunnie
93b9ec00bf bump version numbers on all the packages so we can absorb num-derive changes 2024-12-02 19:14:11 +08:00
bunnie
2ace34abee cleanup static mut warning in hosted mode 2024-12-02 18:54:44 +08:00
bunnie
e4e6db8bc9 fix implicit lifetime warning 2024-12-02 18:54:26 +08:00
bunnie
83e26ff4c7 update num-derive dependency
this became mandatory in 1.83 to remove warnings. I think it
should have no impact on functionality.
2024-12-02 18:52:59 +08:00
bunnie
41078a71fe feature-out the quantum time 2024-12-02 01:22:18 +08:00
bunnie
147cfb8c97 remove xous-pio references in cargo files 2024-12-02 01:21:57 +08:00
bunnie
2d322d852c cleanup warnin 2024-11-20 20:36:57 +08:00
bunnie
dfe5d50f41 start to lay in the APIs for the USB interface in userspace 2024-11-20 01:46:34 +08:00
bunnie
e42b7195b0 add notes about performance improvement for the future 2024-11-19 22:21:48 +08:00
bunnie
d78899ca74 implement retry on SPIM failure
somehow, the retry still *fails* - to be looked into in the future
2024-11-19 22:17:19 +08:00
bunnie
265805ac94 cleanup warnings 2024-11-19 22:17:07 +08:00
bunnie
4a99341269 cleanup warnings 2024-11-14 22:19:40 +08:00
bunnie
fac7adca35 improve UX a little bit 2024-11-14 00:36:24 +08:00
bunnie
0bad04856b debug fixed point underflow issue 2024-11-14 00:34:02 +08:00
bunnie
fc95e8b7b3 update findings 2024-11-14 00:33:39 +08:00
bunnie
c2edfee2fd try to fix timeout issue on camera capture 2024-11-14 00:15:51 +08:00
bunnie
2e25ebff9f upgrade the linederivation to use std
this eliminates occasional storage overflow errors during searching
2024-11-14 00:03:49 +08:00
bunnie
3135407e8e live QR decoding now working!
Got up to version 8 to decode, although version 8 is a bit fussy.

Fairly sensitive to camera focal distance - hard to see focus
issues on B/W display. This needs to be improved in the HW.
2024-11-13 23:29:50 +08:00
bunnie
2b5aab23e0 add fractional iterator for conversion of pixels to modules 2024-11-13 23:29:26 +08:00
bunnie
8002d522b0 add support for neighborhood estimation and version guessing 2024-11-13 23:28:54 +08:00
bunnie
45b5dc1d95 flip image vertically as it comes from the camera fb
this orients it correctly for processing by the QR pipeline
2024-11-12 23:22:15 +08:00
bunnie
9b01753ed3 add some code that attempts a read retry on the SPIM interface
it's not successful, unfortunately.
2024-11-08 00:16:47 +08:00
bunnie
dc0fd47ff4 add an option to decongest udma
There is a hardware bug that causes SPIM RX packets to fail when
the UDMA bus is busy (like when streaming video). This causes
swap memory to fail because it relies on the SPIM bus.

This patch causes the video to sample *after* any computation
happens, so that any swap memory that might be hit taken care of.

This reduces the efficiency of the loop somewhat, because without
the decongesting, we could kick off the camera read and do useful
computation while the camera streamed data. Now we have to keep
them separate to work around this bug.
2024-11-08 00:14:21 +08:00
bunnie
c6871d58b1 placeholder stub for the future USB stack on cramium targets
The USB hardware stack is different enough that I think it
doesn't make sense to wedge it into the existing USB driver.
Instead it will be a separate driver that has the same `lib` level
API calls, but a totally different implementation underneath.

This allows us to make better architectural decisions that will
make the USB stack more reliable because the hardware has some
pretty strict latency requirements on responding to packets that
can't be met with the previous abstraction.
2024-11-07 16:17:08 +08:00
bunnie
2692d374c6 add some test scaffolding for userspace video processing
The whole graphical interface - camera + display & QR code processing -
is incorporated into a single process space to minimize on the amount
of swapping/memory message passing necessary to implement a low-latency,
high-frame rate video interface.

The current service just starts a camera-to-display loopback
while searching for and aligning QR code markers, without consulting
any other service on whether it should do that or not. Suitable
for debug and performance characterization, but not usable for
product integration.

The good news is we're getting an acceptable frame rate on
the camera during search mode with the kernel running.
2024-11-07 16:14:29 +08:00
bunnie
99bf1276db add note about the multithreading option for I2C 2024-11-07 16:05:22 +08:00
bunnie
7cceb9bea4 add APIs and glue logic for implementation of shared I2C resource
The API now provides, in addition to stand-alone read/write
transactions, the ability to send a group of transactions that will
be executed in-order without any other transactions in between.

This allows better compatibility with devices that are designed assuming
they are the sole target on the bus.

Note that the current implementation does not thread out the I2C
handler into its own thread so the service provider blocks until
all the I2C transactions are done. Adding a thread to handle
the I2C stuff would allow other requests to make progress but
at the moment this isn't required.
2024-11-07 16:00:20 +08:00
bunnie
a11f2f7f54 add I2C abstraction to cramium HAL
taking full advantage of the new rkyv crate capabilities!
2024-11-07 15:04:55 +08:00
bunnie
101084a822 cleanup some local echo artifacts 2024-11-05 19:40:51 +08:00
bunnie
9d850a068f add some documentation 2024-11-05 19:40:04 +08:00
bunnie
5935406f89 interpret more escape codes gracefully 2024-11-05 19:39:40 +08:00
bunnie
a9abba0bb0 add a minimal pure terminal based console for baosec target
The screen is tiny, so it's not useful for feedback -- all interaction
happens on the serial console for this target.

Main purpose for this console is debug/test/factory bringup.
2024-11-05 19:38:25 +08:00
bunnie
c2c822e3a3 gate more options behind features 2024-10-27 23:25:48 +08:00
bunnie
14bb0fda69 make usb optional 2024-10-27 23:25:11 +08:00
bunnie
8b8e7680cc update std implementation to assign handler 2024-10-18 04:17:06 +08:00
bunnie
6b48aee498 fix gfx server to comply with updated cram-soc apis 2024-10-10 02:08:13 +08:00
bunnie
8deeac91ee update existing api to match hw api
however, the actual driver is kind of bogus
2024-10-04 13:09:05 +08:00
bunnie
84c79a313b add udmaglobal implementation for xous environment 2024-10-04 13:08:46 +08:00
bunnie
68828cf9ce add IoGpio for xous environment 2024-10-04 13:08:27 +08:00
bunnie
84f88e9e65 configure xous-swapper to point to board files 2024-10-02 01:45:47 +08:00
bunnie
972a314869 configure xous-log to point to board files 2024-10-02 01:45:30 +08:00
bunnie
d3691a556c extract reserved pages from board files 2024-10-02 01:45:14 +08:00
bunnie
728fab3b62 consolidate spi pin setup 2024-10-02 00:24:03 +08:00
bunnie
76e88ebc7d absorb setup_pin trait into the cramium-hal service 2024-10-01 23:14:42 +08:00
bunnie
6f0ab9ae3d add flash write test routine to mbox 2024-10-01 14:41:22 +08:00
bunnie
043dfd84ae update formatting to latest nightly rules 2024-09-24 01:49:45 +08:00
bunnie
f248be981e fix broken factory test 2024-09-24 00:14:52 +08:00
bunnie
a8f2e9da27 fix up a tts bug 2024-09-23 23:02:32 +08:00
bunnie
e68fde8e2b update to use new flat-ipc API 2024-09-23 22:42:24 +08:00
bunnie
f494da21cc absorb new xous-ipc version 2024-09-23 22:05:50 +08:00