Commit Graph

5424 Commits

Author SHA1 Message Date
17e31eb903 rp/spi: sane prescaler calculation 2021-07-11 23:47:33 +02:00
61a3462f87 Merge pull request #278 from huntc/ci-tests
Add tests to our CI
2021-07-06 04:34:10 +02:00
e13aa4c2a0 Add tests to our CI
Also found some doctests that were failing
2021-07-06 12:29:08 +10:00
ff9ff5e43a Update the import 2021-07-05 18:31:54 +10:00
fc1ef4947d Fix stm32 ethernet 2021-07-05 18:18:05 +10:00
3d96b10b0c Elide lifetimes on Peripheral::state 2021-07-05 17:47:55 +10:00
744e2cbb8a extras: Fix UB in Peripheral
`Peripheral` assumed that interrupts can't be preempted,
when they can be preempted by higher priority interrupts.
So I put the interrupt handler inside a critical section,
and also added checks for whether the state had been dropped
before the critical section was entered.

I also added a `'static` bound to `PeripheralState`,
since `Pin` only guarantees that the memory it directly references
will not be invalidated.
It doesn't guarantee that memory its pointee references also won't be invalidated.

There were already some implementations of `PeripheralState`
that weren't `'static`, though,
so I added an unsafe `PeripheralStateUnchecked` trait
and forwarded the `unsafe` to the constructors of the implementors.
2021-07-05 17:42:43 +10:00
ed83b93b6d Merge pull request #276 from embassy-rs/deny-warnings
Deny warnings in CI
2021-07-05 03:24:36 +02:00
ecc151d4e2 stm32/adc: simplify delay handling 2021-07-05 03:18:23 +02:00
7ebd4e3aa9 nrf/gpio: fix unused warning on chips without ports 2021-07-05 02:44:16 +02:00
e4145bf08b Deny warnings in CI 2021-07-05 02:44:12 +02:00
fd38e78957 Remove old unused ci.sh 2021-07-05 02:06:11 +02:00
3ce32d6624 Merge pull request #273 from rukai/fix_warnings_again
fix stm32 warnings
2021-07-05 02:00:51 +02:00
25d4b2ea26 fix stm32 warnings 2021-07-05 01:54:29 +02:00
c4561324e6 Merge pull request #274 from rukai/fix_warnings_again_rp_std
Fix warnings in std and rp
2021-07-05 01:51:47 +02:00
d80e0b9e01 Merge pull request #275 from thalesfragoso/main-tim3
STM: Change embassy main to use TIM3 instead of TIM2
2021-07-05 01:42:43 +02:00
f5e6b37b52 STM: Change embassy main to use TIM3 instead of TIM2 2021-07-04 15:51:10 -03:00
56d0c5ffe1 Fix warnings in std and rp 2021-07-04 12:46:04 +10:00
8615ffb523 Merge pull request #272 from thalesfragoso/f0-apb2
F0: Fix missing apb2 clock
2021-07-03 02:20:17 -03:00
c2f595b26a F0: Fix missing apb2 clock 2021-07-03 02:12:22 -03:00
489ef56dea Merge pull request #270 from bobmcwhirter/fix_bungled_i2c
Let's adjust i2c the correct way, removing the correct APBesque frequ…
2021-07-02 20:00:19 +02:00
f5ce807e25 Let's adjust i2c the correct way, removing the correct APBesque frequency, not the i2c periph speed. 2021-07-02 13:54:07 -04:00
d8687b1692 Merge pull request #268 from bobmcwhirter/i2c_rcc
Remove the frequency argument for i2c, move to using RccPeripheral.
2021-07-01 14:01:39 -04:00
9f5d35d891 Remove the frequency argument for i2c, move to using RccPeripheral. 2021-07-01 13:53:57 -04:00
e7a4a72977 Merge pull request #264 from bobmcwhirter/usartv3
Add USARTv3 support.
2021-07-01 13:28:33 -04:00
8f94123ca4 argh, intellij. 2021-07-01 11:37:01 -04:00
83cd120ff8 Update -data. 2021-07-01 11:30:54 -04:00
0920c0cb1d Make UART pins Rx/Tx/etc in addition to USART. 2021-07-01 11:30:54 -04:00
54ada5bae1 Stub in the DMA bits that aren't yet there. 2021-07-01 11:30:54 -04:00
bf3bc92525 Re-enable because intellij. 2021-07-01 11:30:54 -04:00
f83559c6ab Add L4+ example for USART. 2021-07-01 11:30:54 -04:00
497d3aa153 Add USARTv3 support. 2021-07-01 11:30:54 -04:00
e55c89f890 Merge pull request #262 from Liamolucko/nrf-rng
Add an nRF RNG driver
2021-07-01 01:55:55 +02:00
334c3a44a4 Merge pull request #265 from thalesfragoso/some-fences
stm32: Adjust some fences around DMA
2021-06-30 19:08:17 -03:00
e07dda8707 stm32: Adjust some fences around DMA
Also bump stm32-data
2021-06-30 18:58:21 -03:00
d77d411935 Merge pull request #266 from embassy-rs/rp-clocks
rp: spi, clocks improvements
2021-06-30 23:53:35 +02:00
5fae5d20c0 rp/clocks: don't disrupt PLLs if already running.
This makes it possible to run under https://github.com/majbthrd/pico-debug
2021-06-30 23:46:00 +02:00
53c236fde8 rp/spi: add configurable pha/pol 2021-06-30 23:46:00 +02:00
f073bdfe43 rp/spi: add Transfer 2021-06-30 23:46:00 +02:00
3059923b4f Merge pull request #258 from embassy-rs/rp-clocks
rp/gpio: add optional pins
2021-06-30 22:47:22 +02:00
749f4838d5 rp/gpio: add optional pins 2021-06-30 22:43:15 +02:00
da014afb89 Merge pull request #253 from bobmcwhirter/dma_tables
Generate dma-related macro tables.
2021-06-30 10:50:37 -04:00
f3b9c97763 Change atomics and add a fence. 2021-06-30 10:17:25 -04:00
cf5b7dc943 Because IntelliJ makes life hard. 2021-06-30 10:03:18 -04:00
6a0b0f3162 Enable RCC within the USART itself. 2021-06-30 09:57:27 -04:00
e1736114d4 Remove paste. 2021-06-30 09:44:28 -04:00
99339e940e fix: check if new_ptr == end, not the old pointer 2021-06-30 16:04:34 +10:00
53b95588df Use atomics to share state instead of a RefCell 2021-06-30 15:55:52 +10:00
a64dec517c Update RNG example 2021-06-30 12:55:30 +10:00
89fdad3a6b Don't wake the future for every byte in fill_bytes 2021-06-30 12:34:57 +10:00