Commit graph

473 commits

Author SHA1 Message Date
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
147cfb8c97 remove xous-pio references in cargo files 2024-12-02 01:21:57 +08:00
bunnie
c72607e0bf expand feature flags to be more specific to board types 2024-11-30 02:22:24 +08:00
bunnie
20b0ecd592 add verilator-only modifications to the HAL
verilator doesn't implement the TRNG, so the TRNG is bodged.
A warning is left in to help remind us/alert us if the bodge
is accidentally put into production.

the 'dabao' board type is introduced, which is the breakout board
codename.

camera and display are feature-gated behind their respective board
definitions.
2024-11-30 02:19:55 +08:00
bunnie
2dddae34fc add udma stresstest feature 2024-11-28 18:27:52 +08:00
bunnie
ffb00cf6ad turns out it helps if you put explicit pull-ups on the I/Os
reverting this change
2024-11-28 16:14:14 +08:00
bunnie
a3619618d0 slow down toggle rate on i2c so it is compatible with slow pullups
the strict verilog model has weak pull-ups which model the
"slowness" of the rise with an extended Z-condition that takes
3us to pull up to a solid 1.
2024-11-28 15:53:12 +08:00
bunnie
3738db9f5c fix io-direction issue in testbench 2024-11-28 01:28:39 +08:00
bunnie
13702f2df0 fix unit test to match actual testbench tooling 2024-11-22 15:23:38 +08:00
bunnie
83dbb82500 add routines for programming SPI flash 2024-11-22 00:55:15 +08:00
bunnie
faa8a60843 add ref to mbox module 2024-11-21 18:23:36 +08:00
bunnie
ba87422903 add platform code for mailbox to CM7 2024-11-21 18:23:20 +08:00
bunnie
996b574486 quiet down debug; add a method to expatriate PORTSC 2024-11-20 21:42:02 +08:00
bunnie
5ec5bc29c9 add keyboard pins to board description 2024-11-20 01:42:47 +08:00
bunnie
6829eae73c add a reset method to the UDMA abstraction 2024-11-20 01:42:27 +08:00
bunnie
72685e2c1c improve i2c error recovery 2024-11-20 01:42:06 +08:00
bunnie
289d6879ca fix typo 2024-11-19 22:15:47 +08:00
bunnie
a40d78f3ea add backpressure setting to SPIM; also re-attempt interface clearing
...now that we have the right bit...
2024-11-19 00:00:50 +08:00
bunnie
e8e28702e2 fix position of clear bit; add backpressure feature for NTO 2024-11-19 00:00:18 +08:00
bunnie
fe45f40cb7 increase verbosity of pl230 output for co-debugging 2024-11-18 18:38:41 +08:00
bunnie
d0e638e020 enequeue data before command is issued
it becomes clear on a slower bus configuration that this is
the correct ordering for udma

also add code to debug timeout cases
2024-11-18 18:36:23 +08:00
bunnie
0c5fde7fc2 reformat busy statement for easier debug 2024-11-18 18:35:56 +08:00
bunnie
21e59885e3 add some attempts to debug the SPIM lockup.
for now, filing a bug agaisnt the IP block
2024-11-08 00:17:42 +08:00
bunnie
12f0159fc0 make camera IFRAM de-allocateable
This allows us to use the RAM for USB stack operations.

Will cause panics if camera is operated without re-allocating
the memory.
2024-11-07 16:12:01 +08:00
bunnie
b1e31924a0 add helper routines for qr finding 2024-11-05 01:45:29 +08:00
bunnie
92509c448b some debug cleanup 2024-11-04 22:53:31 +08:00
bunnie
4f85deaecb change api name for resolutions to dimensions 2024-10-27 23:26:45 +08:00
bunnie
d41113fb9a fix operator chaining 2024-10-26 18:42:16 +08:00
bunnie
4dd78b9727 add descriptor chaining helper methods
mass storage is...somewhat stable now, on both linux and windows,
but there are some corrupt packets. need to look into whether
electrical issue, or if we're stomping the transfer buffers because
we've not managed them correctly.

Also need to reflect on how to turn this API into something
safer...the hardware is doing *so much* in this API, the driver
is basically global mutable state with arbitrary slices you can
write over the ends once you hand things off to the driver.
2024-10-26 03:07:00 +08:00
bunnie
9e0bd64195 allocate large swathes of memory to camera
this is for higher resolution QR code scanning

makes it incompatible with simultaneous USB usage

however, when camera is off, the USB stack can be started, and
vice-versa. Basically, you can't both do active USB and camera
at the same time, but you can do one or the other.
2024-10-21 01:22:12 +08:00
bunnie
b5f7c4c490 add minigfx to hal lib 2024-10-21 01:18:51 +08:00
bunnie
407dec86a3 adopt platform & display -agnostic APIs for SH1107 frame buffer 2024-10-21 01:15:48 +08:00
bunnie
0081575e80 fix timer primitive for ov driver 2024-10-21 01:15:09 +08:00
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
f214e9c4d1 add frame slicing to ov2460 driver 2024-10-20 17:04:35 +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
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
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
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
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
be56097fe4 add axp2101 driver skeleton 2024-10-07 22:52:55 +08:00
bunnie
f95941af83 add I2C features to the board description file 2024-10-06 02:44:47 +08:00