Commit Graph

170 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
7cc906d349 rust: Don't require resetting AES engine before every use
When using the AES engine in GCM mode, the hardware *requires*
verifying a tag even if we don't care about the result. Otherwise it
will hang in unfinished state, and needs a reset every time.

By going through these motions (like the SDK does) this costly reset can
be avoided.
2020-04-27 19:47:32 +00:00
Wladimir J. van der Laan
e8dc6282e8 rust: Add more test vectors for AES128/256 2020-04-27 19:00:35 +00:00
Wladimir J. van der Laan
4aef921276 rust: add AES and SHA256 peripheral drivers to k210-shared
And expand crypto engines test with more test vectors.
2020-04-26 10:37:41 +00:00
Wladimir J. van der Laan
7a3f75b922 doc: Add k210.dtsi from u-boot
Proposed u-boot k210.dtsi from Sean Anderson has a much more complete
overview of devices then Linux's.
2020-04-23 14:48:11 +00:00
Wladimir J. van der Laan
378f08da8e rust: Test sha256 accelerator too 2020-04-13 18:02:52 +00:00
Wladimir J. van der Laan
b0bcfec157 rust: Add cryptest 2020-04-13 16:31:09 +00:00
Wladimir J. van der Laan
488f308e57 rust: Bump rust-secp256k1 version 2020-03-08 18:26:36 +00:00
Wladimir J. van der Laan
185a977ff4 linux: Minor code cleanups 2020-03-06 21:17:12 +00:00
Wladimir J. van der Laan
a2d4fc3445 rust: Use aligned_as macro in voxel
Use updated macro by ExpHP from
https://users.rust-lang.org/t/can-i-conveniently-compile-bytes-into-a-rust-program-with-a-specific-alignment/24049/2
2020-03-06 21:12:57 +00:00
Wladimir J. van der Laan
e7de60ebbc linux: Reduce esptun default baudrate more
Changed to `115200 * 4`.
It's hard to get this stable...
2020-02-23 20:22:40 +00:00
Wladimir J. van der Laan
ab95e18ba8 linux: Handle "SEND FAIL" response
UDP sends can fail and then the ESP module returns "SEND FAIL";
we need to handle this, otherwise we'll never consider the send finished.
2020-02-23 20:02:42 +00:00
Wladimir J. van der Laan
7220737241 linux: Use my_err consistently in esptun
Use my_err instead of perror.

Also fix some printf format type mismatches.
2020-02-23 15:00:22 +00:00
Wladimir J. van der Laan
6a5f43b411 linux: Fix false error condition with back-to-back packets
Correct "no progress" check in `esp_read_responses` to avoid issues with
back-to-back packets crashing the tunnel.
2020-02-23 12:48:42 +00:00
Wladimir J. van der Laan
d1981173f7 rust: Use command names from ST7789V datasheet in LCD driver
Use the command names from the ST7789V datasheet instead of the
arbitrary ones borrowed from the SDK.
2020-02-22 23:34:36 +00:00
Wladimir J. van der Laan
a241403058 linux: Add note about esptun baudrates 2020-02-22 15:01:08 +00:00
Wladimir J. van der Laan
0ebae26c05 linux: Optimize binaries for size 2020-02-22 14:37:06 +00:00
Wladimir J. van der Laan
2819afaae5 linux: Mention mtu setting in esptun doc
The standard tunnel mtu of 1500 will cause packets to be dropped,
causing transferring larger files to fail.
2020-02-22 14:26:29 +00:00
Wladimir J. van der Laan
ce9505e670 linux: Unify logging function in esptun 2020-02-22 13:17:40 +00:00
Wladimir J. van der Laan
afde09e6cc linux: Don't set VTIME in UART configuration for esptun
`read(esp_fd)` should wait for 1 or more characters to be available in
the UART FIFO, no timing required.
2020-02-22 13:01:58 +00:00
Wladimir J. van der Laan
c261d4dcc7 linux: Simplify esptun by getting rid of some helper functions
`cread` and `cwrite` are trivial and only called in one place, so just
integrate them.
2020-02-22 12:55:31 +00:00
Wladimir J. van der Laan
7cbb10693e linux: Set timeout argument on poll() properly
`0` for the timeout means *return immediately* instead of
*wait forever*. This is absolutely unnecessary, so change
the argument to `-1` which does mean *wait until something happens*.
2020-02-22 12:22:25 +00:00
Wladimir J. van der Laan
aab7c0a84b linux: Solve an issue with incomplete packets
esp_read_responses was throwing away the buffer contents between
invocations, which is not a good idea if there might be a (partial)
async notification such a a received packet in there.
2020-02-22 11:40:58 +00:00
Wladimir J. van der Laan
526e9683c2 linux: Tune baudrate in esptun
The maximum baudrate seems unstable at times, tune it down a bit.
2020-02-22 11:24:42 +00:00
Wladimir J. van der Laan
885357f22f linux: deduplicate esp receive logic in esptun
Unify the two similar serial receive loops.
(as a bonus we'll no longer lose packets that come in through the ESP during
esp_tx_packet)
2020-02-22 11:24:42 +00:00
Wladimir J. van der Laan
d9750dcf73 Add k210 linux utilities 2020-02-21 15:42:04 +00:00
Wladimir J. van der Laan
78fb83fe50 rust: Add comment for sysctl set_spi0_dvp_data 2020-02-18 06:23:50 +00:00
Wladimir J. van der Laan
4d987f0d7d rust: Important correction to board definition comment
WIFI_RX and WIFI_TX are named from the perspective of the ESP8285,
so they need to be connected RX<->TX and TX<->RX to be used.
2020-02-17 12:32:32 +00:00
Wladimir J. van der Laan
0445bc55ee doc: Add some information about UART1/2/3 2020-02-16 15:11:47 +00:00
Wladimir J. van der Laan
5d20ac05a0 rust: k210-console: Fixes for colorfont generation script 2020-02-16 15:01:05 +00:00
Wladimir J. van der Laan
0636964b39 rust: weather: Show UART1 info at start 2020-02-16 14:57:13 +00:00
Wladimir J. van der Laan
34761dc4b6 rust: k210-console: allow utf to map to color font
- allow utf map function to map to color font (by making it return
  cell-flags too)
- gencolorfont.py accepts multiple input images
2020-02-09 14:30:05 +00:00
Wladimir J. van der Laan
b7fdbc0ad7 rust: Add module for timing/FPS measurement 2020-02-07 19:50:37 +00:00
Wladimir J. van der Laan
556b375078 rust: k210-console: Add cursor positioning 2020-02-07 19:50:37 +00:00
Wladimir J. van der Laan
412e414198 rust: Add comment 2020-02-07 19:50:37 +00:00
Wladimir J. van der Laan
8806f01455 rust: Add LCD shutdown function 2020-02-07 18:48:45 +00:00
Wladimir J. van der Laan
9e6c9f5a8f rust: i2c: Reset I2C controller at initialization
Prevent random hangs when restarting the application because
the I2C controller is still in a busy state.
2020-02-07 18:48:45 +00:00
Wladimir J. van der Laan
0fbf997b0d rust: Split out some structures from k210-console 2020-02-03 16:39:14 +00:00
Wladimir J. van der Laan
69636c4005 rust: Pass in font mapping to k210-console
Support other unicode to font mappings (such as application specific
ones) besides cp437.
2020-02-03 16:19:00 +00:00
Wladimir J. van der Laan
fa38e28491 rust: Pass in font for k210-console
Allow the user code to specify which font to use.
2020-02-03 15:38:17 +00:00
Wladimir J. van der Laan
f9620a47c3 rust: add colorfont support to k210-console
useful for emoji and other small hardcoded images
2020-02-03 15:00:33 +00:00
Wladimir J. van der Laan
0e88fae4d2 rust: lock embedded-graphics to 0.6.0-alpha.2
The API keeps changing significantly between alpha versions, it's too much
work for me to keep updating the demo - I'll update it to 0.6.0 once
there is a release.
2020-02-02 16:55:22 +00:00
Wladimir J. van der Laan
f8b280eb6f doc: interrupt_enabe is not a typo (by me) 2020-01-21 18:46:30 +01:00
Wladimir J. van der Laan
dff0540fc6 doc: Typo fixes in kpu.md 2020-01-21 18:36:35 +01:00
Wladimir J. van der Laan
bd40892845 rust: add upstream PR for cc-rs 2020-01-19 18:10:26 +00:00
Wladimir J. van der Laan
ff78df047d voxel: Use accelerometer to steer 2020-01-12 17:36:28 +00:00
Wladimir J. van der Laan
7e0b0f05b0 voxel: Add smoothing for height 2020-01-12 13:12:20 +00:00
Wladimir J. van der Laan
e85a074309 rust: Add voxel rendering demo 2020-01-12 11:55:53 +00:00
Wladimir J. van der Laan
d128fdd4a8 esp8266at: change to nom 5 2019-12-31 23:19:41 +00:00
Wladimir J. van der Laan
a59cbcd4ee esp8266at: add missing dyn and b"" 2019-12-31 22:46:07 +00:00
Wladimir J. van der Laan
a1c65405ea rust: Clean up cargo patches
No more need for any `k210-hal` and `k210-pac` patches with 0.2.0
2019-12-28 20:17:37 +00:00