Commit Graph

257 Commits

Author SHA1 Message Date
05bc4d198e Merge #423
423: nRF9160 support r=Dirbaio a=diondokter

- Created a chip file with all the peripherals, interrupts and peripheral implementations.
- All peripherals now use an alias for the NS (non-secure) version of the nRF9160 version.
- Implementations of peripherals that don't exist are ignored.
- Most PPI functionality has been stubbed out because the nRF91 has the newer DPPI which is not compatible with the current API. (The channels are also set to not configurable, so they are kinda useless now, but in principle the stubs should never be called)


Co-authored-by: Dion Dokter <dion@tweedegolf.com>
2021-10-13 21:11:41 +00:00
c675fb1036 nrf/saadc: make InputChannel private. 2021-10-13 22:13:30 +02:00
d8c3365d6a nrf/saadc: make Input trait sealed. 2021-10-13 22:13:26 +02:00
0d709fa5c8 nrf/saadc: require unborrow for Input.
This allows using borrowed pins in ChannelConfig.
2021-10-13 22:06:09 +02:00
c1c704bfc8 - Removed the enable assert from UARTE.
- Added nRF9160 to CI.
2021-10-13 15:00:08 +02:00
ddcee446c1 Added anomaly workaround from the HAL to improve the UARTE 2021-10-12 13:35:08 +02:00
2c2c284482 Undoing unnecessary changes 2021-10-12 11:55:38 +02:00
995cd01cbc ran fmt 2021-10-11 15:31:25 +02:00
4643727fea Made all PPI channels not configurable (even though they are) so they can't use unimplemented features 2021-10-11 15:12:40 +02:00
a8407c8aba Merge remote-tracking branch 'upstream/master' 2021-10-11 10:59:34 +02:00
20674f7126 Initial support for nrf9160 2021-10-11 10:39:38 +02:00
14c3260d88 nrf/saadc: move chip-specific mappings to chips/ 2021-10-11 01:36:31 +02:00
cf13dd7df8 nrf/ppi: nrf52805 only has 10 configurable channels. 2021-10-11 01:20:51 +02:00
6e7abba9ff nrf: rename Cargo feature references from "51" to "nrf51".
Note: the feature doesn't actually exist, references are there just in case
nrf51xx is supported in the future.
2021-10-11 01:09:57 +02:00
668364da9c nrf/saadc: nrf52805 only has 2 channels 2021-10-11 00:55:31 +02:00
0b26ab7bbc nrf/saadc: nrf52820 doesn't have it. 2021-10-11 00:55:17 +02:00
8c9e50b378 Conflates the negative and positive types as they are the same, and renames pin to input as they can be more than pins 2021-10-11 09:38:35 +11:00
b043778f75 Removed the NotConnected as it isn't used. 2021-10-11 09:08:58 +11:00
25d6a2cd13 No use case understood for NotConnected, so hiding it for now 2021-10-11 08:56:53 +11:00
617a976e96 No need for unwrap 2021-10-11 08:54:24 +11:00
5f5470a320 Need to borrow the pins for the lifetime of the config, and subsequently the one shot. 2021-10-11 08:52:45 +11:00
cef6158c31 Extend SAADC one shot support
One-shot mode now permits the sampling of differential pins, and the sampling of multiple pins simultaneously.

A new ChannelConfig structure has been introduced so that multiple channels can be configured individually. Further, the `sample` method now accepts a buffer into which samples are written.

Along the way, I've reset some default configuration to align with Nordic's settings in their nrfx saadc driver. Specifically, the channel gain defaults to 6 (from 4) and the time defaults to 10us (from 20us).
2021-10-09 11:25:18 +11:00
0e05ba688d nrf/saadc: remove Sample trait. 2021-10-07 02:10:22 +02:00
99a94f1d50 Update version of critical-section 2021-09-13 17:05:17 +02:00
e24528051b Add WASM support for executor
* Adds an executor for WASM runtimes based on wasm_bindgen.
* Add time driver based on JS time handling.
* Add example that can run in browser locally.
* Update to critical-section version that supports 'std' flag
2021-09-13 16:42:39 +02:00
ead987245d embassy: Refactor module structure to remove kitchen-sink util. 2021-09-11 02:35:35 +02:00
f2623e7e9b Update lots of deps 2021-09-11 01:35:23 +02:00
de016e8456 Remove trait_alias, allow(incomplete_features).
trait_alias seems unused. no idea why it's there.
2021-09-03 17:00:58 +02:00
d0c8749399 Merge pull request #382 from fnafnio/typestate_nrf_timer
Typestate nrf timer
2021-09-02 13:39:55 +02:00
34c66fa78d removed type aliases
NotAwaitable as default generic param
added awaitable_timer example
2021-09-02 12:02:31 +02:00
a81b963561 nrf/saadc: don't use wake_on_interrupt. 2021-09-01 23:54:26 +02:00
1cef7134d4 moved CC::wait to awaitable typestate 2021-09-01 16:20:32 +02:00
a0c40562ea added typestate to nrf-Timer
useful for hooking up the PPI to an Event without needing interrupt
tested with buffered_uart example on nRF52840-DK
2021-09-01 16:16:56 +02:00
7c0990ad1e time: allow storing state inside the driver struct. 2021-08-25 21:06:27 +02:00
ed1ed5225f Expose EASY_DMA_SIZE. 2021-08-22 00:23:03 +01:00
3457bb9f05 nrf: make gpiote and time-driver optional via cargo features. 2021-08-20 15:42:42 +02:00
17659e2e44 nrf/wdt: add handle steal 2021-08-20 14:23:24 +02:00
fe355af4f0 nrf: update to cortex-m-rt 0.7 2021-08-19 17:11:17 +02:00
d3aeb45fb3 Update cortex-m-rt to v0.7 for stm32, rp. 2021-08-19 00:56:11 +02:00
066abfe4c6 nrf/time: allow configuring the rtc irq prio 2021-08-18 22:13:02 +02:00
2540a960e5 nrf: add WDT driver 2021-08-07 14:26:28 +02:00
452f7e0c2c nrf: update PACs to 0.10 2021-08-07 12:41:12 +02:00
05e50e1f4a time_driver: use regular fn ptr -> raw ptr casts 2021-08-05 19:19:47 +02:00
0ea6a2d890 time: replace dyn clock/alarm with a global Driver trait 2021-08-05 19:14:09 +02:00
07d4b196f7 Update nightly, remove removed features. 2021-08-04 19:48:14 +02:00
3f28bb6c77 common: Initialize PeripheralMutex state with closure to ensure it's done in-place. 2021-08-02 20:13:41 +02:00
af87031d62 hal-common: remove Pin in PeripheralMutex 2021-08-02 19:55:04 +02:00
7bfb763e09 Rename embassy-extras to embassy-hal-common 2021-07-29 13:44:51 +02:00
c8a48d726a Merge pull request #277 from Liamolucko/fix-peripheral-ub
extras: Fix UB in `Peripheral`
2021-07-29 13:08:30 +02:00
d5ba35424d Replace PeripheralStateUnchecked with register_interrupt_unchecked 2021-07-29 15:11:26 +10:00