Commit graph

60 commits

Author SHA1 Message Date
bunnie
d38ad8a289 format services/com 2024-01-14 22:06:28 +08:00
Jean-Pierre De Jesus DIAZ
3e2eb63663
imports: remove com_rs-ref
The crate just re-exports the com_rs crate. This patch changes usages of
com_rs-ref to use com_rs directly.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-05-02 14:33:17 +02:00
Jean-Pierre De Jesus DIAZ
d651ce51cc
services/com: Implement From instead of Into
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-12 15:38:38 +02:00
bunnie
f815ed85b5 fix rust 1.64.0 rkyv warning regressions on unused enum types
rkyv-derived enums throw warnings that they are unused.
Not sure how to get rid of them; I've tried surrounding them in
`#[allow(dead_code)]` directives, and also explicitly creating
each enum variant that I'm aware of through some dummy code and
some log prints of the dummy code calls to ensure the results are
used, and the warnings still persist.

Significantly, the warnings only happen for enums that take
a value. Simple rkyv enums do not throw a warning.

These warnings overwhelm the build logs, so they need to be isolated
in order for us to ensure that the build is clean of other more
important warnings.

The method chosen to isolate them is to take the enums that are
problematic, carve them into their own special file, and add
a file-wide `#![allow(dead_code)]` directive. This only happens
in 7 service crates, and this change commits all of the modifications
in a single big commit that could be undone later if this turns out
to be a compiler regression or something similar.

I also opened an issue with the rkyv maintainer to see what his
opinion is on the situation.

https://github.com/rkyv/rkyv/issues/318
2022-10-09 17:17:20 +08:00
bunnie
3ee086b257 fix interrupts (broke them trying to do some exceptional error handling) 2022-07-11 04:39:10 +08:00
bunnie
734a382ae9 add FLASH_VERIFY to COM command set. Add apilevel to com_rs.
This adds the FLASH_VERIFY command, which is going to be used
to help automate some update logic.

The notion of an apilevel has also been added to every com_rs
command; this can be used by the COM to figure out what commands
are valid for talking to the current reported EC version.

The version parsing of the string passed back from the EC has
been replaced with the code in the xous-semver crate.
2022-07-10 01:04:34 +08:00
Sean Cross
e91705c0ae services: com: add discriminants to opcodes
Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-17 11:30:03 +08:00
bunnie
a7c9027d05 make the COM reset no longer open loop; unblock as soon as EC responds 2022-02-05 15:44:47 +08:00
bunnie
177ad38db2 derive SSID scan on shellchat from the connection manager
The connection manager keeps track of all our SSIDs, not the COM.
2022-01-30 16:53:15 +08:00
bunnie
5ef7126ede add better handling for wfx HIF err condition 2022-01-27 14:02:28 +08:00
bunnie
4c4ca1577f fix connection manager state machine
seems to work a lot better, but needs a lot more testing
2022-01-27 03:56:39 +08:00
bunnie
0cafd10e28 refactor status bar to take advantage of the new fonts 2022-01-22 18:25:39 +08:00
bunnie
4f9374e860 add enhanced debugging to the COM for wf200 2022-01-14 15:27:24 +08:00
bunnie
a4bb889a5d update wlan status to a binary version with more detailed output 2022-01-14 02:23:57 +08:00
bunnie
0ba8650731 refactor SSID reporting
later on we'll have to add some UX around this but for now
the command line stuff is a bit nicer.
2022-01-13 21:12:14 +08:00
bunnie
7aa2c7b054 a very basic e2e pddb application that tries to restore a network connection
lots of problems to solve still, but let's pick that up on the refactor
stage -- for now we want to get some evidence that the pddb API is
workable.
2022-01-09 01:29:28 +08:00
bunnie
e6643e725d implement UDP rx 2021-10-18 04:02:55 +08:00
bunnie
74a3c6df44 disastrous first draft of figuring out how to integrate smoltcp using a ping example. 2021-10-10 01:57:31 +08:00
bunnie
560c6e4197 something packet-oid is coming out of the serial port now? 2021-10-09 02:12:12 +08:00
bunnie
b43eb56346 add some skeleton for a net crate; testing COM interrupts 2021-10-08 20:01:13 +08:00
bunnie
dfc6444d78 add killkey test to the self test suite 2021-09-14 20:15:03 +08:00
bunnie
3f1ba5e279 add com trng seed, uptime on EC; EC reset test commands 2021-09-13 23:28:54 +08:00
bunnie
858a1ed019 beginnings of a factory self-test routine; expand COM functionality 2021-09-05 23:26:07 +08:00
Sam Blenny
5c93365acd implement COM bus txrx for wlan commands
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
03ad8bd2e4 add support for wlan commands to com server
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
bunnie
7529628053 partial progress on EC updater 2021-05-24 04:34:50 +08:00
bunnie
3f12b0a69b add a gyro test command to shellchat 2021-05-16 16:52:27 +08:00
bunnie
5d4e716e1b add status thread mechanism to check charger state 2021-05-16 16:30:58 +08:00
bunnie
87b6d9b6d7 add backlight commands 2021-05-16 04:29:12 +08:00
bunnie
2d3a643d20 retrofit COM for suspend/resume 2021-04-29 23:53:35 +08:00
bunnie
061284ec5f debugging BOOST mode glitch issue
Here's an arcane bug for you:

When powering down, the Spartan 7 3.3V I/O drivers will
output a roughly 800us wide glitch as 3.3V falls below around
1.7V, if the 0.95V core voltage comes down first (which it does
because we have an active discharge on 0.95V, but not on 3.3V).

In this case, it's just wide and high enough to cause the
BOOST mode line to engage, which takes the BOOST output
and ties it to VBUS, which is just enough for the system to
think you're powering it back on again. Which is not what
you want when powering down.

The ultimate fix was to put a heftier pull-down on the BOOST
line so that it can't trip the BOOST output into the VBUS.
Another option could be more active discharge FETs, but that
would require a full board spin and we are already at certification,
so we'll stick with the stronger pull-down on BOOST. It seems to
be a robust fix in the worst corner cases we can find.

The downside is that when powering an external USB device,
you are burning an extra 30mW of power overcoming the pull-down,
but typically, any external USB devices plugged into Precursor
will burn far in excess of that, so the delta should be negligible.
2021-04-23 15:33:14 +08:00
bunnie
ca63091f98 add ship mode command 2021-04-22 18:07:27 +08:00
bunnie
b2c0608b0b initial cut at SSID scanning 2021-04-16 23:07:31 +08:00
bunnie
22d676cc59 add reporting of sleep current 2021-04-16 19:58:05 +08:00
bunnie
93400df67c an initial cut at fcc test commands 2021-04-15 04:10:47 +08:00
bunnie
9f4dc8a7b1 add wifi reset opcodes 2021-04-14 22:43:23 +08:00
bunnie
39153f6fba cleanup warnings 2021-04-02 18:07:39 +08:00
bunnie
906f8779a8 cleanup details 2021-04-02 17:57:33 +08:00
bunnie
d6fd42b593 COM refactor of callbacks 2021-04-02 16:40:17 +08:00
bunnie
d21c0fa3e7 refactor of COM
this was much harder than I liked.
2021-04-02 05:43:47 +08:00
Sean Cross
fdce58d06e ipc: convert project to use xous-ipc
This rewrites the entire project so that most runnable projects now use
`xous-ipc` instead of `xous::String` where possible.

This also removes `rkyv` from the list of dependencies in `xous-rs`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 20:22:33 +08:00
bunnie
d68e3e8cf4 an attempt to refactor to rkyv 0.4.1
unfortunately, it looks like deserialize requires an alloc??
2021-03-16 02:02:53 +08:00
bunnie
0af72ffb6d clean up Sendable references and warnings 2021-02-17 23:29:20 +08:00
Sean Cross
c820573450 services: com: remove unused imports from api
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:47:07 +08:00
bunnie
fc8290cdb4 futzing around and something is kind of working on xous-string port to rkyv 2021-02-15 00:05:42 +08:00
bunnie
7e0902344c move XousBuffer to xous-rs 2021-02-13 01:42:31 +08:00
Sean Cross
704c0f47bf com: don't use internal xous_names register api
This API is now private.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-10 15:03:35 +08:00
bunnie
cc6992c3df implement "imports" methodology
This commit simplifies managing git-repo hosted dependencies, so
there is a single location for changing the package path.
2021-01-20 16:22:38 +08:00
bunnie
73286828c8 more GAM API fleshing out; now to the point of updating a TextView 2021-01-18 04:12:40 +08:00
bunnie
2eafe825b8 refactor COM to use generic name registrations for event listeners 2021-01-12 18:44:02 +08:00