Wladimir J. van der Laan
cbb53817e3
rust: Switch back to k210-pac upstream
...
Patch "Remove work-around for pcrel issue" was merged.
2019-09-27 14:41:19 +02:00
Wladimir J. van der Laan
ff064f596f
rust: Update for embedded-graphics 0.6.0-alpha.2
2019-09-16 14:54:11 +00:00
Wladimir J. van der Laan
ce5c41f0da
rust: use repr(C) for aligned structs
...
Just a precaution: we want a predictable layout here.
2019-09-05 11:17:23 +00:00
Wladimir J. van der Laan
dfd14f517f
rust: address 0xffffffff80000000 → 0x80000000
...
Try working without address work-around to aid debugging and disassembly.
2019-08-29 10:19:32 +00:00
Wladimir J. van der Laan
1397aa19db
rust: Animate dot in embfx
...
Also add bounds check for pixels iterator (whoops).
2019-08-28 07:53:35 +00:00
Wladimir J. van der Laan
860bda159a
rust: Simplify and optimize pixel iterator
...
It should be entirely safe to write u16 to a u32 array: no alignment
issues, no risk of creating undefined values.
2019-08-28 07:05:53 +00:00
Wladimir J. van der Laan
d1ee942f10
rust: Add embgfx demo
2019-08-26 08:37:09 +00:00
Wladimir J. van der Laan
68faef6cf4
rust: SPI clock speed constant for LCD
2019-08-21 14:56:04 +00:00
Wladimir J. van der Laan
37cf4ad5a2
rust: Test PLL computation against output of C implementation
2019-08-21 14:55:31 +00:00
Wladimir J. van der Laan
eab9d94a1b
rust: Return usable PLL register values directly from the computation
...
The internal representation and parameter names are just an implementation detail.
2019-08-21 09:01:55 +00:00
Wladimir J. van der Laan
9bdf7ea2df
rust: Factor PLL computation out from sysctl
...
If you need to have mystery meat algorithms, at least abstract
them.
2019-08-21 08:49:41 +00:00
Wladimir J. van der Laan
d7eb8dd0e8
rust: sysctl PLL setting
...
Port over the terrible PLL frequency setting code, and use it to set up
the clocks for every demo.
2019-08-20 21:18:23 +00:00
Wladimir J. van der Laan
f8f7235daa
rust: UART/network optimizations
2019-08-18 14:40:19 +00:00
Wladimir J. van der Laan
213ca1d50e
rust: Use buffered UART1 in term-server and weather
2019-08-16 17:27:39 +00:00
Wladimir J. van der Laan
1118d708b1
rust: Actually provide trap handler
2019-08-15 20:53:22 +00:00
Wladimir J. van der Laan
335f728b72
rust: Drop cc-rs patch
...
1.0.40 was released with RISC-V support !
2019-08-15 14:57:53 +00:00
Wladimir J. van der Laan
1990bff89f
rust: k210-pac dependency bump
2019-08-15 12:48:41 +00:00
Wladimir J. van der Laan
b6b5d13b0c
rust: Add interrupt test
...
really want to handle UART interrupts so this needs PLIC
and dispatching but this is a start…
2019-08-14 18:35:38 +00:00
Wladimir J. van der Laan
31da4a7cd7
rust: Update secp256k1 dependency to 0.15.2
...
`lowmemory` feature was merged upstream, no need for a patch anymore.
2019-08-14 17:57:05 +00:00
Wladimir J. van der Laan
0dcbeda646
rust: sdcard read/write sectors using DMA
2019-08-12 17:43:16 +00:00
Wladimir J. van der Laan
ed91b43e2a
rust: sdlcd improvements
...
- Init error reporting
- Put 16-bit halves of display output correctly
- Better comments
2019-08-12 07:37:32 +00:00
Wladimir J. van der Laan
a46b314c6d
rust: Clean up sdlcd, add ffmpeg commandline to README
2019-08-12 06:57:27 +00:00
Wladimir J. van der Laan
31dc21ce85
rust: Add sdlcd example
...
Stream raw SD card contents directly to LCD screen.
2019-08-11 18:16:53 +00:00
Wladimir J. van der Laan
862407a1bc
rust: Comment update
2019-08-11 18:16:53 +00:00
Wladimir J. van der Laan
e32ba5b66a
rust: Bump LCD SPI clock rate
...
Now that LCD is using DMA, the SPI clock rate can be increased.
2019-08-11 18:16:53 +00:00
Wladimir J. van der Laan
a5d1f5c9ae
rust: Make SPI send/recv loops nicer
...
Use iterators to make the loops simpler.
2019-08-11 18:16:53 +00:00
Wladimir J. van der Laan
161bd9982e
rust: Prefer X::from
to as X
2019-08-11 18:16:44 +00:00
Wladimir J. van der Laan
c2c6287f9c
rust: Basic sdcard test
...
Print SD card information and dump a sector.
2019-08-11 09:56:54 +00:00
Wladimir J. van der Laan
ff1e5c5483
Rust dependency bump
2019-08-09 14:51:54 +00:00
Wladimir J. van der Laan
6056338e93
rust/secp256k1-test: Pushing bits upstream
...
Not yet upstream:
- cc-rs: disable fPIC for risc-v targets
- secp256k1: low-memory feature
- riscv-rt: .sdata2 sections linker script
2019-08-08 06:48:30 +00:00
Wladimir J. van der Laan
d9434deb22
rust/game-of-life: Check toggle coords against correct bounds
2019-08-07 18:32:09 +00:00
Wladimir J. van der Laan
4ed4555586
rust: Add secp256k1 test
2019-08-07 18:14:48 +00:00
Wladimir J. van der Laan
e43668a88c
rust: Remove k210-pac patch
...
Upstream k210-pac is good enough now, no need to override it anymore.
2019-08-07 13:01:01 +00:00
Wladimir J. van der Laan
4e5ea50f08
rust: lcd: Clarify magic values
2019-08-07 11:27:49 +00:00
Wladimir J. van der Laan
e86d5c5f75
Use DMAC for display everywhere
...
This mimics the way the Kendryte SDK does things—it is better because
the MMIO based SPI tends to sometimes lose synchonization when the CPU
doesn't keep up providing data fast enough.
2019-08-07 10:22:05 +00:00
Wladimir J. van der Laan
2906c8c895
DMAC!
...
Add basic DMAC support (SPI/LCD first).
The current implementation (adding _dma to LCD traits) is really, really
awkward and just for testing. Probably it would be better for the LCD to
own its own dedicated DMA channel to avoid having to pass them in
for every… single… thing…
2019-08-07 09:19:44 +00:00
Wladimir J. van der Laan
0f15e5f85d
weather: Repeat query every 10 minutes
2019-07-26 12:32:04 +00:00
Wladimir J. van der Laan
c091f406eb
Fix cargo build
in /rust
...
Move esp8266 out of the workspace, it defaults to `nom` with different
features (`std` enabled) which means that `std` gets enabled for use of
nom (see https://github.com/rust-lang/cargo/issues/4463 ).
This caused the build to fail with missing std in riscv-….
2019-07-26 11:06:22 +00:00
Wladimir J. van der Laan
427e370600
rust: Bump riscv-rt dependency
...
This version bump is necessary to get a linker script that works with
newer nightlies.
2019-07-23 18:29:06 +00:00
Wladimir J. van der Laan
6cd6168038
rust: Add term-server demo
2019-07-06 16:00:06 +00:00
Wladimir J. van der Laan
d4b2b6bbbd
rust: Dependency bump k210-hal
...
Peripherals moved to pac, UARTS take the pins to use and internally
configure sysctl.
2019-07-03 18:24:24 +00:00
Wladimir J. van der Laan
02f1e24258
rust/weather: Revert unintentional changes
2019-07-02 17:53:40 +00:00
Wladimir J. van der Laan
c1fc53d249
Dependencies bump
2019-07-02 17:20:39 +00:00
Wladimir J. van der Laan
3ff4933a88
Comment updates
2019-07-02 15:13:22 +00:00
Wladimir J. van der Laan
ec7ce47dff
rust: Add rust version of glyph mapping demo
2019-06-02 12:51:51 +00:00
Wladimir J. van der Laan
1531cc8fe0
dvp-ov: Align frame to 64 bytes
...
The magic seems to work without (how do we even DMA without the DMAC?),
but when in doubt better to follow the SDK.
2019-06-02 09:56:39 +00:00
Wladimir J. van der Laan
e9f95b7e0d
rust: Fix orientation in dvp-ov
...
Camera image was rotated by 180 degrees, the easiest way to fix this
is to rotate the display from LRUD to RLDU.
2019-06-01 23:25:41 +00:00
Wladimir J. van der Laan
610af76592
rust: esp8266at: Wrap parsing of responses to avoid exposing dependency on nom
...
Makes it possible to switch parser later for whatever reason,
it's undesirable to expose these implementation details to clients.
2019-06-01 23:06:00 +00:00
Wladimir J. van der Laan
d20791330d
rust: Remove wrong comment from dvp
2019-06-01 22:51:53 +00:00
Wladimir J. van der Laan
9bdd98f29b
rust: Clean up SPI interface
...
Selectively borrow types from pac, this breaks the need for a direct
dependency on pac for clients of SPI and makes the interface easier to
use.
2019-06-01 22:07:52 +00:00
Wladimir J. van der Laan
00ac503e3e
rust: clean up FPIOA interface
...
Remove need for .into() everywhere by accepting everything
that goes into usize in the appropriate methods.
2019-06-01 21:56:35 +00:00
Wladimir J. van der Laan
1630dc2a31
rust: Add dvp-ov
2019-06-01 21:56:35 +00:00
Wladimir J. van der Laan
cd7f72f03f
rust: Improve DVP interface
...
Clean up interface a bit.
2019-06-01 21:56:35 +00:00
Wladimir J. van der Laan
8cc5ff53f5
rust: DVP
...
Add support for DVP peripheral.
2019-06-01 21:56:35 +00:00
Wladimir J. van der Laan
5f2c94fa01
rust: Simplify I2C traits
...
All the I2C blocks are the same, no need for all the different
abstractions. Fix a wrongly copy-pasted comment.
2019-06-01 09:35:42 +00:00
Wladimir J. van der Laan
62b594b8dc
rust: make PWM usable with every timer
2019-05-31 16:17:11 +00:00
Wladimir J. van der Laan
f8166abd0f
rust/esp8266at: Pass a FnMut directly
...
There's no good reason to require a mutable reference to a closure
here.
Also works around https://github.com/rust-embedded/riscv-rt/issues/33
2019-05-31 11:31:14 +00:00
Wladimir J. van der Laan
76fcc08c46
WIP: improve weather
...
Fix Rust warnings etc.
2019-05-30 20:38:05 +00:00
Wladimir J. van der Laan
1235edb40c
rust: Update k210-pac commit
...
Use latest version.
2019-05-30 19:51:26 +00:00
Wladimir J. van der Laan
21a834f162
esp8266at: Add listen support
2019-05-30 19:44:04 +00:00
Wladimir J. van der Laan
df87ec9e90
rust: k210-console improvements
2019-05-30 19:37:38 +00:00
Wladimir J. van der Laan
71b427b188
rust: Add weather
...
Add `weather` demo, also extend console as necessary to handle wttr.in's escape codes.
2019-05-27 07:51:21 +00:00
Wladimir J. van der Laan
bfe58fe72b
rust: Add esp8266at library
...
Add library for communicating with WiFi using the ESP8266 using AT
commands.
This really should have its own repo at some point.
2019-05-27 07:51:21 +00:00
Wladimir J. van der Laan
adc1e73ad1
rust: clamp instead of ignore out-of-bounds events in rgbcontrol
...
Improve responsiveness at edges of screen.
2019-05-27 07:51:21 +00:00
Wladimir J. van der Laan
678366a4d6
Fix debug printing in uart-passthrough demo
2019-05-27 09:50:44 +02:00
Wladimir J. van der Laan
d14c640356
rust: Add rgbcontrol
2019-05-23 13:53:02 +00:00
Wladimir J. van der Laan
8ca44a288f
Add demo for uart-passthrough
2019-05-21 17:10:51 +02:00
Wladimir J. van der Laan
72a5434397
rust: uart-passthrough set baudrate and reset
2019-05-21 12:09:10 +00:00
Wladimir J. van der Laan
d07fd84160
Unify license and CoC
...
No need to have a zillion copies of these in the repository. Also remove
references to RISC-V team.
2019-05-20 15:59:28 +02:00
Wladimir J. van der Laan
a9b7ed1a43
rust: Add uart-passthrough
2019-05-20 15:58:09 +02:00
Wladimir J. van der Laan
12818a0f1d
rust: Bump k210-pac and k210-hal git revisions
2019-05-18 20:24:52 +00:00
Wladimir J. van der Laan
3b70f3cdc1
rust/sysctl: clock_get_freq for all clocks
2019-05-18 20:20:22 +00:00
Wladimir J. van der Laan
ce28856653
rust: LCD x/y y/x orientation
2019-05-18 19:51:24 +00:00
Wladimir J. van der Laan
5e1213870c
rust/i2c: Use variants in init
2019-05-18 19:29:55 +00:00
Wladimir J. van der Laan
b14679e35a
rust: Generalize I2C peripheral
2019-05-18 19:07:17 +00:00
Wladimir J. van der Laan
13b91fe993
rust: Generalize SPI peripheral
2019-05-18 18:14:26 +00:00
Wladimir J. van der Laan
f69a77eb84
rust/sysctl: Implement resets
2019-05-17 19:12:59 +00:00
Wladimir J. van der Laan
44cad99478
rust/sysctl: APB clocks
2019-05-17 18:07:39 +00:00
Wladimir J. van der Laan
1b48da7be0
rust/k210-shared: More helpful panic handler
...
Try sending the panic message to UARTHS.
2019-05-15 08:14:49 +00:00
Wladimir J. van der Laan
b6676ffcf8
rust/accelerometer: Draw bubble
2019-05-14 17:09:32 +00:00
Wladimir J. van der Laan
a7f437c8ce
rust: Add accelerometer
2019-05-14 17:19:25 +02:00
Wladimir J. van der Laan
08cd58654f
rust: enum for I/O pin definitions
2019-05-14 11:30:22 +00:00
Wladimir J. van der Laan
582092810f
rust: Use core::cmp where useful
...
Write clamping expressions shorter.
Thought it didn't exist in no_std...
2019-05-13 20:18:56 +00:00
Wladimir J. van der Laan
927a21229e
rust: Add game-of-life
2019-05-13 19:57:59 +00:00
Wladimir J. van der Laan
0572038b07
rust: Add i2c module
...
Just enough to support NS2009 for now.
2019-05-13 19:57:01 +00:00
Wladimir J. van der Laan
3ba2204102
rust/sysctl: clock_get_freq add I2Cx clocks
2019-05-13 13:31:09 +00:00
Wladimir J. van der Laan
8dff340565
rust/sysctl: Handle all peripheral clocks
2019-05-13 09:30:23 +00:00
Wladimir J. van der Laan
667c051969
rust: Add mandelbrot
...
Add mandelbrot zoom demo, and move some things to shared crate.
Switch to most recent k210-pac revision to fix fp issue.
2019-05-12 18:17:42 +00:00
Wladimir J. van der Laan
d9453e8a52
Fun with rust
2019-05-11 10:24:59 +00:00