Jonathan Dickinson
d2b17de145
fix: make RP2040 I2C slave aware of serial writes
...
In general, this commit allows the I2C slave to recognize when writes
are occuring in serial - and seperate them out into independant
commands. In order to achieve this it:
* Corrects some setup parameters for the I2C state machine.
- Enables clock stretching
- Enables recommendations from the datasheet
* Participates in clock stretching. This is done by leaving the
`R_RD_REQ` register of `IC_INTR_STAT` set until the
slave has responded with some bytes (in `respond_to_write`).
* Recognizes `FIRST_DATA_BYTE` of `IC_DATA_CMD`, which indicates to a
slave-receiver than the current byte is part of a new transaction.
* Uses a state machine heavily inspired by the one in rp-rs as an
implementation detail. This is no more correct than the existing
approach, but makes the code significantly easier to reason about.
* Two additional errors were added, both indicating that the provided
buffer is too small for the message from the master-sender. As a
convenience, they have the same assosciated data so that matching
can be performed in the event that the call site handles messages
in a consistent way.
2023-11-09 23:32:29 -05:00
xoviat
b3367be9c8
Merge pull request #2161 from xoviat/low-power
...
add low power for g4
2023-11-09 01:16:02 +00:00
xoviat
da4feb3693
Merge branch 'main' of github.com:embassy-rs/embassy into low-power
2023-11-08 19:13:12 -06:00
xoviat
05a4bb3a4a
rustfmt
2023-11-08 19:06:29 -06:00
xoviat
4b4c28d875
stm32: add low power for g4
2023-11-08 19:04:20 -06:00
Dario Nieuwenhuis
1977acdb11
Merge pull request #2164 from embassy-rs/msos-descriptor
...
usb: remove msos-descriptor feature.
2023-11-08 22:23:37 +00:00
Dario Nieuwenhuis
0b015bd727
usb: remove msos-descriptor feature.
2023-11-08 23:21:52 +01:00
Dario Nieuwenhuis
79acb560ec
Pin noproto git rev.
2023-11-08 23:05:00 +01:00
xoviat
94586576a0
Merge pull request #2160 from Nigecat/main
...
Fix typo in embassy-net docs
2023-11-07 23:56:03 +00:00
Nigecat
a3e200d011
Fix typo in embassy-net docs
2023-11-08 09:28:33 +11:00
xoviat
3bccb67231
Merge pull request #2155 from xoviat/eth
...
stm32: resolve eth/v2 security bug
2023-11-07 21:42:55 +00:00
xoviat
553f0158c0
stm32: resolve eth/v2 security bug
...
fixes #2129
2023-11-07 15:39:06 -06:00
Dario Nieuwenhuis
b44a5fcaf6
Merge pull request #2159 from kalkyl/usb-bulk-cleanup
...
rp: Remove control handler from USB raw bulk example
2023-11-07 19:52:11 +00:00
kalkyl
8effff3383
rp: Remove control handler from USB raw bulk example
2023-11-07 20:45:01 +01:00
Dario Nieuwenhuis
05f983c607
Merge pull request #2158 from kalkyl/usb-bulk
...
rp: Add USB raw bulk example
2023-11-07 19:22:55 +00:00
kalkyl
d44383e9a7
fmt
2023-11-07 20:19:56 +01:00
kalkyl
37a773c037
Use driver reexport
2023-11-07 20:17:19 +01:00
kalkyl
d1adc93614
rp: Add USB raw bulk example
2023-11-07 19:57:05 +01:00
Dario Nieuwenhuis
78a7ee7ec4
Merge pull request #2157 from kalkyl/usb-raw
...
rp: Add USB raw example + msos-descriptor to examples and usb-logger
2023-11-07 10:30:52 +00:00
kalkyl
e3fe13e905
Add docs
2023-11-07 10:58:35 +01:00
kalkyl
38bfa6916f
Update pio-uart example
2023-11-07 09:15:21 +01:00
kalkyl
50139752bc
Add comments
2023-11-07 09:10:18 +01:00
kalkyl
db4cd73894
rp: Add USB raw example + msos descriptor to examples and usb-logger
2023-11-07 09:05:10 +01:00
Dario Nieuwenhuis
8369f7614a
Merge pull request #2156 from adamgreig/usb-raw-example
...
Update stm32 usb_raw example to use MSOS descriptors for WinUSB
2023-11-07 02:35:59 +00:00
Adam Greig
326bc98bd2
Update stm32 usb_raw example to use MSOS descriptors for WinUSB
2023-11-07 02:34:27 +00:00
Dario Nieuwenhuis
584fc358fd
Merge pull request #2154 from bugadani/executor
...
Prepare embassy-executor 0.3.2
2023-11-06 20:53:19 +00:00
Dániel Buga
b8f9341edc
Prepare embassy-executor 0.3.2
2023-11-06 21:50:40 +01:00
Dario Nieuwenhuis
7ca557b917
Merge pull request #2152 from bugadani/atomic
...
Executor: Yeet core::sync::atomic from risc-v
2023-11-06 18:46:50 +00:00
Dániel Buga
8d8d50cc7a
Yeet core::sync::atomic, remove futures-util dep
2023-11-06 17:35:02 +01:00
Dario Nieuwenhuis
5948d934d3
Merge pull request #2150 from bugadani/block
...
Ensure TcpIo not blocking when reading into empty slice
2023-11-06 12:44:15 +00:00
Dario Nieuwenhuis
746936f8cd
Merge pull request #2151 from eZioPan/rcc-init-set-vos
...
check PLL settings before set VOS
2023-11-06 12:43:29 +00:00
eZio Pan
8f543062aa
check PLL settings before set VOS
2023-11-06 18:30:59 +08:00
Dániel Buga
15660cfc68
Ensure TcpIo not blocking when reading into empty slice
2023-11-06 09:12:16 +01:00
Dario Nieuwenhuis
74f70dc7b4
Merge pull request #2149 from embassy-rs/usb-fixes3
...
stm32/otg: fix enumeration on non-f4 chips.
2023-11-06 03:19:50 +00:00
Dario Nieuwenhuis
7084570478
stm32/otg: fix enumeration on non-f4 chips.
...
Fixes regression from #2148
2023-11-06 04:13:06 +01:00
Dario Nieuwenhuis
58719dcb58
Merge pull request #2148 from embassy-rs/usb-fixes3
...
stm32/otg: fix CONTROL OUT transfers on F4.
2023-11-06 02:46:38 +00:00
Dario Nieuwenhuis
b4eef6b1ee
stm32/otg: fix CONTROL OUT transfers on F4.
2023-11-06 03:38:42 +01:00
Dario Nieuwenhuis
70a700e430
stm32/otg: log TRDT
2023-11-06 03:38:13 +01:00
Dario Nieuwenhuis
b8679c0cc8
stm32/rcc: set highest VOS on some F4s with no overdrive.
2023-11-06 03:37:39 +01:00
xoviat
ad861179cc
Merge pull request #2147 from xoviat/low-power
...
stm32: update metapac and use stop data
2023-11-06 02:35:57 +00:00
Dario Nieuwenhuis
d9b00c01e0
usb: reject instead of panic on CONTROL OUT longer than the buf.
2023-11-06 03:26:00 +01:00
xoviat
239ad5ebea
stm32: update metapac and use stop data
2023-11-05 20:09:33 -06:00
xoviat
46cffcc8d4
Merge pull request #2119 from JuliDi/fmc-sram-adc
...
STM32: Add raw access to FMC peripheral and fix typo in build.rs
2023-11-06 01:31:56 +00:00
Dario Nieuwenhuis
e6462f1e88
Merge pull request #2146 from adamgreig/stm32g4-opamp
...
Remove accidentally leftover println
2023-11-06 01:15:55 +00:00
Adam Greig
d464d1a841
Remove accidentally leftover println
2023-11-06 01:11:57 +00:00
xoviat
980c3cf42b
Merge pull request #2142 from adamgreig/stm32g4-opamp
...
stm32: support internal output on g4 opamps
2023-11-06 00:01:34 +00:00
Adam Greig
28eb4cd817
stm32: support internal output on g4 opamps
2023-11-05 23:57:15 +00:00
Dario Nieuwenhuis
3de01bc223
Merge pull request #2145 from embassy-rs/rcc-no-spaghetti
...
stm32/rcc: add shared code for hsi48 with crs support.
2023-11-05 22:58:18 +00:00
Dario Nieuwenhuis
0272deb158
stm32/rcc: add shared code for hsi48 with crs support.
2023-11-05 23:52:54 +01:00
xoviat
c4a8b79dbc
Merge pull request #2143 from adamgreig/raw-usb-example
...
Add raw USB example using control transfers
2023-11-05 17:34:58 +00:00