Added more predefined scalar messages
Checks WiFi status
Spawns separate thread for client_sync (reading the network)
Most all log messages are now INFO (to be shown by default)
Closes#300
Signed-off-by: Tom Marble <tmarble@info9.net>
Rather than hardcoding numbers, use an enum with the constant values.
This will make it easier to reason about what the constants mean.
Signed-off-by: Sean Cross <sean@xobs.io>
Allows a variable to be set to the EMPTY string
- by not setting a value `/set myvar`
During initialization now verifies that PDDB is mounted.
Added warnings for PDDB not mounted and WiFi not connected.
- the WiFi check is not yet implemented
Signed-off-by: Tom Marble <tmarble@info9.net>
Adds migrations framework
Delays mtxcli initialization until first user input, because we know:
- PDDB is mounted
- Timer is stable
- User actually using mtxcli
Adds send_async_msg scalar_async_msg
- basis for automatically updating chatroom
Signed-off-by: Tom Marble <tmarble@info9.net>
Adds migrations framework
- Migration for v0.9.11-0120: update the filter
Filter
- narrow filter to only the fields and events for the current room
Introduces "read only" variables (e.g. __version).
Signed-off-by: Tom Marble <tmarble@info9.net>
- we don't need a general memset call -- just a zero page call
- use native rust semantics to embody the call. some alignment checking is
done on the arguments on the way in and out that seem worth it
- the unrolled loop doesn't pay off because we're at the limit of
write bandwidth on the CPU at this point. we would need write-back
caches to gain more performance through unrolling.
@xobs found a scheduler bug that would trigger a runnable process
search every time a scalar message returned. This fixes the problem,
causing the quantum to go back to the caller as intended.
Improves performance on the syscall by about 40%.
The original implementation didn't keep around some key data,
so we had to read the old version of the record and update parameters
assuming that the USB descriptors didn't change too much.
Unfortunately with the mass storage option, the description can
change quite a bit, so we have to reconsitute it from scratch.
Basically, we re-do the `alloc()` call in the reset routine,
playing it reverse so that we setup all the higher-number
endpoints before doing ep0 last.
This hopefully fixes a stability issue for usb hid mode when
mass storage is enabled as a build option.
- use new SpinalUsbDevice::new() interface instead of cloning
- put the blank "key-up" event on keyboard events after the
core is switched to, instead of at boot.
- add some more appropriate debug statements to help track
view switching in debug logs
Instead of making it once and then cloning it (which is a bit
unclear what's going on), make it so that the shared memory
ranges are allocated in the caller's scope, and then create
the structure "clean".
Also add a static AtomicBool to track interrupt init state,
since that can be only called once.
For some unknown reason, just adding a second bulk endpoint descriptor makes enumeration
fail on essentially all operating systems.
Adding three endpoints is no issue though, but since we want to avoid wasting resources around
here, writing 0x42 at the end of the last bulk endpoint... fixes everything.
Tested under Linux, Windows, OpenBSD, FreeBSD.
bulk endpoints have a different behavior now than interrupt
endpoints; bulk endpoints have chained descriptors so that the
hardware automatically responds to multiple USB packets quickly.
interrupt endpoints also have subtly different way of handling
data readiness, which is incompatible with the block device layer
as implemented.
since we don't have a clear use case for this yet and it's just
for testing on bleeding-edge, make a very small disk just so it's
easier for people to do testing, but not so big that it's a burden
on the system.
later on we can make this dynamically sizeable/allocateable only
e.g., only when the disk is required