Commit Graph

45 Commits

Author SHA1 Message Date
a2e7c24e00 Clippy fixes 2021-10-18 01:05:29 +02:00
2c2c284482 Undoing unnecessary changes 2021-10-12 11:55:38 +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
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
ead987245d embassy: Refactor module structure to remove kitchen-sink util. 2021-09-11 02:35:35 +02:00
7bfb763e09 Rename embassy-extras to embassy-hal-common 2021-07-29 13:44:51 +02:00
7ebd4e3aa9 nrf/gpio: fix unused warning on chips without ports 2021-07-05 02:44:16 +02:00
105c8504b6 Mark Unborrow as unsafe to implement 2021-05-19 23:29:33 +02:00
32fc17f0fd nrf/gpiote: Allow choosing IRQ priority. 2021-05-17 21:27:27 +02:00
97b01f1c47 nrf/gpiote: initialize automatically 2021-05-17 00:57:20 +02:00
bd9589d0ce nrf: add support for nrf52805, nrf52811, nrf52820 2021-05-17 00:57:20 +02:00
e2ad5e1395 Add detection of edge transitions for ports 2021-04-16 07:58:24 +02:00
8b1ffb2cb7 Remove Pin from GPIO traits 2021-04-14 17:04:40 +02:00
b6496a85d8 nrf/ppi: implement and add example 2021-03-29 00:58:58 +02:00
646be40ac5 nrf/gpiote: make number() public, change to usize 2021-03-29 00:58:58 +02:00
90f599bc2f nrf/gpiote: update output channel to new API 2021-03-29 00:58:58 +02:00
2bd9323f28 nrf/gpiote: update input channel to new API 2021-03-29 00:58:58 +02:00
1c9f98e1b6 nrf/gpiote: fix irq race condition
The interrupt could fire between checking if sense=disabled and registering the waker,
in which case the future would get stuck.
2021-03-29 00:58:58 +02:00
0e8bb5dc0b util: Do not unregister waker on wake in AtomicWaker. 2021-03-29 00:58:58 +02:00
a08d781442 nrf/gpio: allow borrowed pins. 2021-03-29 00:58:58 +02:00
95218bf8d4 Rename GpioteInput -> PortInput 2021-03-29 00:58:57 +02:00
ba7b3974bb nrf/gpiote: update to new gpio 2021-03-29 00:58:57 +02:00
d4f2c6cf00 Remove cargo namespaced-features 2021-03-02 21:15:12 +01:00
9626aee7db Move traits to separate crate. 2021-03-02 00:32:23 +01:00
45355f184a move most interrupt methods to InterruptExt extension trait. Fixes #35 2021-03-01 00:44:38 +01:00
da91779117 interrupt: Split set_handler context.
Since introducing the ctx pointer, the handler is now two words, so setting it can
race with the interrupt firing. On race it's possible for the new handler to be
alled with the old ctx pointer or viceversa.

Rather than documenting this, it's better to split the function in two to make it
obvious to the user that it's not atomic. The user can use a critical section, or
disable/enable the interrupt to avoid races if this is a concern.
2021-02-26 02:04:48 +01:00
11be9170ec Cleanup interrupt package naming. Fixes #40
The `interrupt` package previously tried to be drop-in compatible with the
`interrupt` package from PACs. THis meant that there was both a PAC-style enum
value `UARTE0` and an embassy-style owned `UARTE0Interrupt` type. This made
things VERY confusing.

This drops compatibility with the PAC, improving the names for embassy interrupts.
2021-02-26 01:55:27 +01:00
b69f72e055 Get rid of some warnings 2021-02-13 21:41:36 -03:00
a7797a918d nrf/gpiote: new api: switch to owned structs, implement WaitForHigh/WaitForLow. 2021-02-04 23:56:17 +01:00
9e88718fbd Add "context" pointer to owned interrupt handlers. 2021-01-04 22:25:39 +01:00
af5454fbfe Update drivers to owned irqs. 2020-12-29 01:53:17 +01:00
6f76c0ebcc Add support for log+defmt again, but better. 2020-12-01 17:46:56 +01:00
78135a81d9 Remove anyfmt 2020-11-27 18:42:59 +01:00
2e062f5627 gpiote: change port api to directly return futures. 2020-11-09 01:04:34 +01:00
61b1d4e188 Fix build for nrfs with 32 gpios 2020-11-08 19:05:34 +01:00
e539cd32ca Fix logging with anyfmt/log 2020-11-08 19:00:23 +01:00
fc0fe842ee Add support for GPIOTE Port event. 2020-11-08 18:59:31 +01:00
def225b982 gpiote: better naming 2020-11-08 17:38:45 +01:00
5e8608c7a5 Make defmt optional with new anyfmt crate 2020-11-01 17:17:24 +01:00
0643095695 Fix build with all nrf chip models 2020-10-31 23:03:09 +01:00
ec4b95579d gpiote: take owned pin but add function to borrow it. 2020-10-19 21:25:54 +02:00
33dce24e8a Add gpiote output channel. 2020-09-29 19:18:52 +02:00
c81d626254 gpiote: take borrow instead of owned pin.
This makes it possible to read the pin while the channel is created.
2020-09-29 04:17:32 +02:00
f9e2cef7f2 Add GPIOTE async hal. 2020-09-23 00:32:49 +02:00