Commit Graph

4681 Commits

Author SHA1 Message Date
Dario Nieuwenhuis
b72da125eb
Merge pull request #1144 from embassy-rs/usb-control-docs
usb/driver: document ControlPipe.
2023-01-05 02:20:05 +01:00
Dario Nieuwenhuis
0ecc54f58c usb/driver: document ControlPipe. 2023-01-05 01:46:35 +01:00
bors[bot]
f339e8518f
Merge #1143
1143: rp2040: add {tx,rx}-only constructors to UART r=Dirbaio a=pferreir

As discussed with `@henrik-alser` on Matrix. I also added an example, feel free to remove it if it's too much.

Co-authored-by: Pedro Ferreira <pedro@dete.st>
2023-01-04 20:18:02 +00:00
Pedro Ferreira
6d4c6e0481 rp2040: add {tx,rx}-only constructors to UART 2023-01-04 21:11:19 +01:00
Timo Kröger
840a75674b rp: Disable RX interrupts when ring buffer is full
When data is in the RX fifo the RX timeout interrupt goes high again even after clearing it.
The result is a deadlock because execution is stuck in the interrupt handler. No other code
can run to clear the receive buffer.
Enable and disable RX interrupts based on the buffer fill level.
Use the same approach for the TX code path.
2023-01-04 16:53:43 +01:00
Timo Kröger
a24037edf9 rp: Fix BufferedUart drop code
Only unregister the interrupt handler when both parts are inactive
2023-01-04 15:59:03 +01:00
Timo Kröger
68c186309f rp: Common init function for BufferedUart
BufferedUart, BufferedUartRx and BufferedUartTX can all use the same init code.
2023-01-04 15:58:26 +01:00
Ulf Lilleengen
2332d8cd23
feat: compile bootloader examples for nRF91
* Add nRF91 as target in CI builds
* Add example linker scripts for nrf91
* Make less nRF52 assumptions example config
* Add llvm-tools-preview required for cargo objcopy example
2023-01-04 13:38:43 +01:00
Rasmus Melchior Jacobsen
5aa59e9737 feat(stm32): Let uart implement embedded-io Read/Write 2023-01-04 12:57:19 +01:00
bors[bot]
bf4c0de16a
Merge #1139
1139: Wdt config changes r=lulf a=huntc

Per commits:

* By passing WDT config around we can control it more easily and promote sharing it between files.

* The memory layout of the s140 crept into a number of memory files, which can cause confusion (well, it did for me!).

* Obtaining the current WDT config is useful so that we do not have to duplicate configurations around the place. A constructor method has been introduced that attempts to return the current running WDT config from the WDT peripheral. The bootloader example has also been updated to show how the watchdog can be obtained and used.

Co-authored-by: huntc <huntchr@gmail.com>
2023-01-04 07:44:23 +00:00
huntc
8497f98de2 Provides a means of obtaining the current WDT config
Obtaining the current WDT config is important so that we do not have to duplication configuration around the place. A constructor method has been introduced that returns WDT config in accordance with how the register is presently configured. The bootloader example has also been updated to show the watchdog can be obtained and used.
2023-01-04 12:13:44 +11:00
huntc
6e6c3cbebc Cleaned up some doc and memory layout
The memory layout of the s140 crept into a number of memory files, which can cause confusion.
2023-01-04 10:27:16 +11:00
bors[bot]
35afb60dd4
Merge #1138
1138: embassy-boot (rp): Add WatchdogFlash r=Dirbaio a=kalkyl



Co-authored-by: kalkyl <henrik.alser@me.com>
2023-01-03 23:25:52 +00:00
huntc
651eec0242 Pass WDT config around
By passing WDT config around we can control it more easily and promote sharing it between files.
2023-01-04 10:19:39 +11:00
kalkyl
413f339489 Cleanup 2023-01-03 23:34:50 +01:00
kalkyl
9428c40c8d embassy-boot (rp): Add WatchdogFlash 2023-01-03 22:58:56 +01:00
bors[bot]
0aa2a9ac27
Merge #1093 #1127
1093: Add random example r=Dirbaio a=miathedev

Thanks Lulf for the help!

This should be added as example so other people can look it up easily.

With love,
Mia



1127: clean up doc comment generation r=Dirbaio a=Weshnaw

I noticed that when I created doc comments for my tasks that the doc comments got included on the inner function but not the outer functions, I personally prefer keeping the documentation as clean as possible so this PR aims to hide the inner function and then add doc comments to the outer function.

The actual changes include:
* adding #[doc(hidden)] onto the `task_inner` function
  * I flip flopped on this one because I could imagine someone may want this in their docs, but decided to include but I think arguments could be made either way
* copy the attributes from `task_inner` to `task_outer`
  * I don't work with proc_macros often so I am not entirely sure if the way I went about it is correct but it seems to work fine
    * specifically: using `parse_quote` to create the `task_outer` as a `ItemFn` then duplicating the attributes from `task_inner` to `task_outer`
  * I also am not sure if it's a good idea to duplicate all attributes over, but I honestly wasn't sure how to just get the just doc comment attributes

![OLD doc](https://user-images.githubusercontent.com/3748858/209456006-bfa6d40d-d3bf-4c1d-a2de-cf40828b58e5.png)
![NEW doc](https://user-images.githubusercontent.com/3748858/209456011-995363a3-f5b1-4ea3-9db9-1c566643efcb.png)


Co-authored-by: miathedev <mia@metzler.systems>
Co-authored-by: Brendon Fallquist <bfallquist@gmail.com>
2023-01-02 23:13:41 +00:00
bors[bot]
a6b52bde58
Merge #1130
1130: USB serial (CDC-ACM) improvements r=Dirbaio a=timokroeger

* Remove unused call management descriptor
* Set flag for supported capabilities

The rp `usb_serial` example still works with windows hosts.

Co-authored-by: Timo Kröger <timokroeger93@gmail.com>
2023-01-02 22:51:58 +00:00
Dario Nieuwenhuis
9900ac2c9a
Merge pull request #29 from metlos/fix-pm
Be able to specify the power management mode at init time.
2023-01-02 21:38:51 +01:00
Dario Nieuwenhuis
a2bae33d84 Add separate function to set power management mode. 2023-01-02 21:36:51 +01:00
Lukas Krejci
001610f0d0 Be able to specify the power management mode at init time. 2023-01-02 21:34:13 +01:00
Dario Nieuwenhuis
072b8ce035
Merge pull request #34 from mattiasgronlund/wlan_read_fix
Fixed length for wlan_read.
2023-01-02 00:26:37 +01:00
mattiasgronlund
c1fa46bd36
Merge branch 'master' into wlan_read_fix 2022-12-31 16:40:22 +01:00
Mattias Grönlund
871700f05d Fixed length for wlan_read.
The length provided in command word for FUNC_WLAN READ, should
describe the actual bytes requested, not the size of the buffer
which is sized in u32.
2022-12-31 16:25:37 +01:00
bors[bot]
42f1b3ac74
Merge #1136
1136: Fix a typo r=Dirbaio a=lonesometraveler

Many thanks for maintaining this project. Here is a minor typo fix.

Co-authored-by: Kentaro Okuda <lonesometraveler@mac.com>
2022-12-30 17:54:21 +00:00
Kentaro Okuda
72bb4f8798 Fix a typo 2022-12-30 08:53:16 -05:00
bors[bot]
3478004b4d
Merge #1135
1135: Add Clone & Copy on embassy_nrf::gpio::Level r=Dirbaio a=mdevlamynck

This simply adds the Clone and Copy derive traits on embassy_nrf::gpio::Level.

Co-authored-by: Matthias Devlamynck <matthias.devlamynck@mailoo.org>
2022-12-29 16:31:36 +00:00
Matthias Devlamynck
2c8080b0ae Add Clone & Copy on embassy_nrf::gpio::Level 2022-12-29 17:26:49 +01:00
bors[bot]
7add0eafb8
Merge #1133
1133: rp: Fill and empty FIFOs in buffered uart interrupt r=Dirbaio a=timokroeger

Fixes an issue where only the first byte was transmitted. Should improve throughput aswell.

Co-authored-by: Timo Kröger <timokroeger93@gmail.com>
2022-12-27 15:55:51 +00:00
Timo Kröger
e4f457646f rp: Fill and empty FIFOs in buffered uart interrupt
Fixes an issue where only the first byte was transmitted.
Should improve throughput aswell.
2022-12-27 11:28:52 +01:00
Dario Nieuwenhuis
2548bbdd65 Update Embassy. 2022-12-27 01:19:26 +01:00
bors[bot]
3afb62d8d6
Merge #1132
1132: net: allow changing mac addr at runtime r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-12-27 00:14:16 +00:00
Dario Nieuwenhuis
771806be79 net/chan: split state runner. 2022-12-27 01:07:58 +01:00
Dario Nieuwenhuis
4a4b593694 net; allow changing MAC addr at runtime. 2022-12-27 01:04:55 +01:00
Dario Nieuwenhuis
1b6799d93f split bus, consts into separate mods. 2022-12-26 23:34:27 +01:00
bors[bot]
4297eb27ff
Merge #1131
1131: rp: switch to released 0.2.1 pio crate. r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-12-26 21:31:20 +00:00
Dario Nieuwenhuis
41d6316984 rp: switch to released 0.2.1 pio crate. 2022-12-26 22:30:22 +01:00
Timo Kröger
4e0d563997 usb cdc-acm: Set flag for supported capabilities 2022-12-26 09:36:04 +01:00
Timo Kröger
97f9f248f4 usb cdc-acm: Remove unused call management descriptor 2022-12-26 09:35:23 +01:00
Dario Nieuwenhuis
147609d3bd
Merge pull request #1129 from embassy-rs/net-driver
net: driver crate split
2022-12-26 05:06:15 +01:00
Dario Nieuwenhuis
007246b160 net: split channel-based driver impl from usb cdc-ncm into a separate crate. 2022-12-26 04:49:08 +01:00
Dario Nieuwenhuis
1f033d509a net: split driver trait to a separate crate. 2022-12-26 04:49:08 +01:00
Dario Nieuwenhuis
639b3f1d5b usb-driver: remove unused log feature. 2022-12-26 03:34:05 +01:00
Dario Nieuwenhuis
5655c6093f net: use atomic-polyfill on tcp client pool, for thumbv6m support. 2022-12-26 03:34:05 +01:00
Dario Nieuwenhuis
72bb9b53a2 net: remove unused pool-x features 2022-12-26 03:34:05 +01:00
bors[bot]
c29657f95a
Merge #1128
1128: Add missing SPI pins r=Dirbaio a=pferreir

The SPI definitions lack the pins which are not accessible on the pico (but are so e.g. on the stamp).

Co-authored-by: Pedro Ferreira <pedro@dete.st>
2022-12-25 23:52:33 +00:00
Pedro Ferreira
f2fb9a2ca6 Add missing SPI pins 2022-12-25 23:49:04 +00:00
Dario Nieuwenhuis
076ada4c02 Add feature to display console logs from the wifi firmware. 2022-12-25 22:50:59 +01:00
Dario Nieuwenhuis
42cc0c6d73 print ioctl error as signed. 2022-12-25 22:50:59 +01:00
Dario Nieuwenhuis
56b50f8b62 fix bp_read.
It was broken since the switch from u8 to u32.
2022-12-25 22:50:59 +01:00