Commit graph

7769 commits

Author SHA1 Message Date
bunnie
d5ba0c4cb7 add a plantform-agnostic graphics API
first step on a long road to improve the graphics API on Xous.
2024-10-21 01:13:40 +08:00
bunnie
5c6be58056 revise camera code - capture 256x240 frames
this improves decoding for e.g. type 5 codes, which is
a bit too tight with a 128x120 frame.
2024-10-20 17:05:45 +08:00
bunnie
f214e9c4d1 add frame slicing to ov2460 driver 2024-10-20 17:04:35 +08:00
bunnie
f16e3721be add some QR code debugging stuffs 2024-10-20 17:03:50 +08:00
bunnie
b6fbc4ef36 clean up some gross static mut state stuff
still have to resolve the static mut issue of getting the USB
controller state into the interrupt controller.

I'm not sure there *is* a good way to do it - this might actually
be "the" use case for static mut's - but the point of this
exercise was to just diff out the driver in machine mode versus
OS mode to try and figure out if there's a hardware problem
causing instability or if it's a driver issue

the conclusion so far is that the USB stack requires extremely
tight interrupt handling timing, and so, for better stability
we may have to mirgate away from the heavily user-space dependent
implementation currently in use.
2024-10-19 00:15:12 +08:00
bunnie
37ceefef21 add usb mass storage command handlers
disk enumerates now, and initiates r/w transactions but
the reference driver does not match the implementation in that
the USB stack can't access all of RAM, so we have to add
an intermediate stage that splits the command requests into
smaller chunks
2024-10-19 00:14:12 +08:00
bunnie
dabd87aa3a add usb mass storage command handling 2024-10-19 00:13:52 +08:00
bunnie
529c8b18b2 various fixes to driver
- add USB mass storage state tracking for handler-based intervention
- fix some wait loops

need to regression test this againt a xous-mode USB operation
2024-10-19 00:12:38 +08:00
bunnie
ed9759f524 remove a debug statement 2024-10-18 17:18:06 +08:00
bunnie
90d7f45f0a adjust locations of memory for USB loader
and document the rationale
2024-10-18 17:17:29 +08:00
bunnie
452ba4adff cleanup area for statics used by the loader 2024-10-18 17:16:21 +08:00
bunnie
6c655e9358 re-enable interrupts immediately in the handler
we need to catch an interrupt that gets issued while we
are still handling the pending interrupt.
2024-10-18 17:15:24 +08:00
bunnie
a6e7459cdd re-organize the USB subsystem into modules 2024-10-18 14:45:15 +08:00
bunnie
e4f5c32ff3 update link locations to make space in loader for USB stack
this is in preparation for loader-based updates

may have to increase space even more when we pull in e.g.
firmware signing and verification primitives.
2024-10-18 04:17:36 +08:00
bunnie
8b8e7680cc update std implementation to assign handler 2024-10-18 04:17:06 +08:00
bunnie
d8cd9ba5c5 add hook to USB testing, and also move the kernel to make space for loader USB 2024-10-18 04:16:31 +08:00
bunnie
3a4ae8f09f add usb to cramium platform 2024-10-18 04:16:08 +08:00
bunnie
8b14494a15 fix some bugs in gpio twiddle code 2024-10-18 04:15:47 +08:00
bunnie
2ec562169c modify USB HAL for no-std ops
split the handler out into a function pointer

add callbacks for completion handling of EPs - in-line with
the reference code

improve the pei handling

change visibliity of structures to allow for out of crate
handlers
2024-10-18 04:14:49 +08:00
bunnie
af6f4766ff translated reference USB stack into Rust
implements mass storage; needs debugging
2024-10-18 04:13:57 +08:00
bunnie
97a7d44a31
Merge pull request #588 from betrusted-io/mpwevb-cam
Mpwevb cam
2024-10-16 03:10:48 +08:00
bunnie
3b61a60a2c remove boot delay, add reset-debug feature targets 2024-10-16 03:06:41 +08:00
bunnie
2d468eff60 make sram-margin explicit in cramium-soc target 2024-10-16 03:06:22 +08:00
bunnie
4c810ec447 add various debugging assembly routines for the loader 2024-10-16 03:05:54 +08:00
bunnie
778af25414 add handler for pmic open failure; add test case for self-powerdown 2024-10-12 00:46:47 +08:00
bunnie
2cb3bbf780 add SE0 pin setup 2024-10-12 00:46:15 +08:00
bunnie
701170e7e7 make device opening fallible 2024-10-12 00:45:53 +08:00
bunnie
1f148a6136 update readme 2024-10-10 02:10:10 +08:00
bunnie
6b48aee498 fix gfx server to comply with updated cram-soc apis 2024-10-10 02:08:13 +08:00
bunnie
b665032ab0 bump lockfile 2024-10-10 02:08:04 +08:00
bunnie
37e82f1662 add ticktimer ref to cramium-hal
this is needed for delays in Xous mode - the camera requires
some dead-reckoned delays between i2c writes and reads
2024-10-10 02:07:15 +08:00
bunnie
e806421141 add camera test to loader
this loops an image from the camera to the oled display in real time.
it will also dump the Y (luminance) data to to a serial port for
offline development & testing of the QR code algorithm.
2024-10-10 02:05:40 +08:00
bunnie
70de9c707d cleanup bootlogo routine 2024-10-10 02:05:18 +08:00
bunnie
7bd9e2b86b add camera pins & ifram spec 2024-10-10 02:04:49 +08:00
bunnie
552096d2a0 add prelim ov2640 driver 2024-10-10 02:04:22 +08:00
bunnie
091082dfcc add a clear routine for the sh1107 frame buffer 2024-10-10 02:03:59 +08:00
bunnie
2d8747605c promote visibility of some udma config constants 2024-10-10 02:03:37 +08:00
bunnie
c001b2759e add a method to clone an iox handle
gpios for everyone!
2024-10-10 02:03:11 +08:00
bunnie
30fdc139e5 simplify new methods for spim 2024-10-08 17:59:42 +08:00
bunnie
b99c5544c6 simplify new methods for i2c 2024-10-08 17:59:31 +08:00
bunnie
717ddefb2e add references to new libraries 2024-10-07 22:53:29 +08:00
bunnie
4e6c2706c9 employ the axp2101 driver to setup the voltages 2024-10-07 22:53:10 +08:00
bunnie
be56097fe4 add axp2101 driver skeleton 2024-10-07 22:52:55 +08:00
bunnie
12cfb40546
Merge pull request #587 from betrusted-io/mpwevb-bringup
WIP: MPW-evb bringup
2024-10-06 02:47:37 +08:00
bunnie
b87c9f7672 add I2C tests & code for setting the LDO initial value 2024-10-06 02:45:18 +08:00
bunnie
f95941af83 add I2C features to the board description file 2024-10-06 02:44:47 +08:00
bunnie
7399c4a6da add mapping for i2c channels to global clocks; fix typo 2024-10-06 02:44:16 +08:00
bunnie
d45052b772 add i2c base driver 2024-10-06 02:43:49 +08:00
bunnie
81c6d9510b modularize the udma module 2024-10-04 22:59:02 +08:00
bunnie
d7af82261e did *not* mean to commit the font-out hack
this is just to make cycle times faster during debug only
2024-10-04 22:53:00 +08:00