Commit Graph

4709 Commits

Author SHA1 Message Date
Ardelean Calin
e7c876d744 Changed pin to private as it is for OutputChannel 2022-11-22 17:36:22 +02:00
Ardelean Calin
64c2e1b9b6 Switched to PeripheralRef for channel. 2022-11-22 17:35:38 +02:00
bors[bot]
61be0e75c8
Merge #1068
1068: Add Default to some types r=Dirbaio a=mkj

These are a couple of places I've found `Default` to be handy

Co-authored-by: Matt Johnston <matt@ucc.asn.au>
2022-11-22 15:04:24 +00:00
Ardelean Călin Petru
a074cd0625
Update gpiote.rs
Adding these changes enables us to define a channel using a mutable reference to `GPIOTE_CH(n)`, similar to how we can do with other drivers.
So instead of using:
```rust
let freq_in = InputChannel::new(
    p.GPIOTE_CH0,
    Input::new(&mut p.P0_19, embassy_nrf::gpio::Pull::Up),
    embassy_nrf::gpiote::InputChannelPolarity::HiToLo,
);
```
we can use:
```rust
let freq_in = InputChannel::new(
    &mut p.GPIOTE_CH0,
    Input::new(&mut p.P0_19, embassy_nrf::gpio::Pull::Up),
    embassy_nrf::gpiote::InputChannelPolarity::HiToLo,
);
```
2022-11-22 16:56:04 +02:00
bors[bot]
ca4f615b25
Merge #1067
1067: doc: update cargo manifests with keywords r=lulf a=lulf



Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-11-22 13:59:28 +00:00
Matt Johnston
536b6a2de5 sync/signal: Implement Default for Signal 2022-11-22 21:55:42 +08:00
Ulf Lilleengen
51233c0357 doc: update cargo manifests with keywords 2022-11-22 14:51:23 +01:00
Dario Nieuwenhuis
5c52d6c217
Merge pull request #1066 from embassy-rs/embassy-macros-doc
doc: add README to embassy-macro
2022-11-22 14:31:56 +01:00
Ulf Lilleengen
f474817872 doc: add README to embassy-macro
Documents the main and task macros.
2022-11-22 13:57:41 +01:00
bors[bot]
97cb95bbf4
Merge #1042
1042: embassy-nrf: Add SPIS module r=Dirbaio a=kalkyl

Verified to be working on nrf9160

Co-authored-by: Henrik Alsér <henrik.alser@me.com>
Co-authored-by: Henrik Alsér <henrik.alser@ucsmindbite.se>
Co-authored-by: kalkyl <henrik.alser@me.com>
2022-11-22 11:20:14 +00:00
bors[bot]
99c561a749
Merge #1065
1065: embassy-nrf: Default disable UARTE (nrf9160) r=Dirbaio a=kalkyl

Uarte is enabled by default on the nrf9160, which is both bad for power consumption and renders the other "shared" peripherals unusable. This might be an SPM bug, but had the same issue with all pre-compiled SPM:s available out there, so adding this fix until we figure out.

Co-authored-by: Henrik Alsér <henrik.alser@me.com>
2022-11-22 11:02:50 +00:00
Henrik Alsér
f09745dfe1 embassy-nrf: Default disable UARTE (nrf9160) 2022-11-22 02:21:06 +01:00
Henrik Alsér
da9f82f507 Fix pin refs 2022-11-22 02:13:03 +01:00
bors[bot]
f13639e78c
Merge #1059
1059: embassy-rp: Add basic ADC module r=kalkyl a=kalkyl

Oneshot ADC

Co-authored-by: Henrik Alsér <henrik.alser@me.com>
2022-11-22 01:06:25 +00:00
Henrik Alsér
908eef2775 Change interrupt modify into write 2022-11-22 02:03:34 +01:00
Henrik Alsér
633ffe46ae config write, docs, add address_match_index 2022-11-22 01:57:00 +01:00
Henrik Alsér
e6b9722a31 Remove nrf9160 UARTE fix 2022-11-22 01:07:59 +01:00
bors[bot]
b8f51c6496
Merge #1057
1057: stm32g0: Fix ADC for channels above 14 r=Dirbaio a=jaxter184

using the CHSELR register in sequence mode does not support ADC channels above 14. Also, it seems like the sequencer itself wasn't being used anyway, so I turned it off (maybe the whole block from L72..L76 could be removed?) and used a bit shift.

Co-authored-by: Jaxter Kim <jaxter.kim@elektron.se>
2022-11-21 23:58:28 +00:00
Henrik Alsér
33ee48b9e8 Merge branch 'spis' of github.com:kalkyl/embassy into spis 2022-11-22 00:55:46 +01:00
Henrik Alsér
a6d941fac3 Fix txonly/rxonly data pin dir, _from_ram and doc 2022-11-22 00:55:05 +01:00
bors[bot]
15b4ed2c67
Merge #1060
1060: feat: embassy-usb-logger and example for rpi pico r=Dirbaio a=lulf

* Add embassy-usb-logger which allows logging over USB for any device implementing embassy-usb
* Add example using logger for rpi pico

Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
2022-11-21 22:52:58 +00:00
bors[bot]
bbfb786139
Merge #1064
1064: Fix LoRaWAN PHY settings for SX126x driver r=Dirbaio a=jbeaurivage

While working on #1023 / #1041, I noticed that the `lorawan_device::PhyTxRx` implementation does not conform to the LoRaWAN standard, and therefore devices using this driver could never communicate with a gateway. This PR backports the changes I've made to fix the offending parameters, and I can confirm that the driver now works with LoRaWAN networks.

* Set preamble length to 8 symbols
* Set polarity to inverted for received messages

Co-authored-by: Justin Beaurivage <justin@wearableavionics.com>
2022-11-21 22:08:46 +00:00
Justin Beaurivage
81dc532d2d Fix LoRaWAN PHY settings for SX126x driver
* Set preamble length to 8 symbols
* Set polarity to inverted for received messages
2022-11-21 12:08:44 -05:00
Ulf Lilleengen
06fb3e4251 docs: add missing README for usb-logger 2022-11-21 11:24:53 +01:00
Sijmen Woutersen
4943dec1a7 Merge remote-tracking branch 'upstream/master' 2022-11-20 20:04:23 +01:00
Christian Perez Llamas
15a93246d6 Buffer management in line with other peripherals. Constructor and config redesign 2022-11-19 19:18:20 +01:00
Christian Perez Llamas
f5391efe22 Fix fmt 2022-11-19 02:17:58 +01:00
Christian Perez Llamas
64e8cfef8e Fix build 2022-11-19 01:38:03 +01:00
Christian Perez Llamas
16838f8a66 Fix format 2022-11-19 00:32:09 +01:00
Christian Perez Llamas
6b88057aef Add missing parts and Cleanup 2022-11-19 00:29:05 +01:00
Ulf Lilleengen
a444a65ebf feat: embassy-usb-logger and example for rpi pico
* Add embassy-usb-logger which allows logging over USB for any device
  implementing embassy-usb
* Add example using logger for rpi pico.
2022-11-18 11:22:58 +01:00
Christian Perez Llamas
1ed260b105 Fix buffer overruns 2022-11-17 00:19:22 +01:00
Henrik Alsér
9f870a5edf Cleanup 2022-11-15 16:31:19 +01:00
Henrik Alsér
eb149a0bd4 embassy-rp: Add basic ADC module 2022-11-15 16:12:07 +01:00
Jaxter Kim
551b54ddcb stm32g0: Fix ADC for channels above 14 2022-11-15 12:56:47 +01:00
bors[bot]
2528f45138
Merge #1058
1058: Fix some errors in the documentation r=lulf a=johannesneyer



Co-authored-by: Johannes Neyer <johannes.neyer@gmail.com>
2022-11-15 11:35:43 +00:00
Johannes Neyer
9505a6f752 [doc] Remove obsolete code sample 2022-11-15 10:10:36 +01:00
Johannes Neyer
ea61c19280 [doc] Fix some grammar 2022-11-15 10:10:36 +01:00
Johannes Neyer
bcec55464f [doc] Fix line indices of basic example 2022-11-15 10:10:33 +01:00
kalkyl
0b066b22d1 Check events_acquired 2022-11-14 16:24:21 +01:00
kalkyl
3a1ddd66c6 Cleanup interrupts 2022-11-14 16:18:11 +01:00
kalkyl
8d2d5a30a5 Single waker 2022-11-14 11:39:55 +01:00
kalkyl
43c1afb6a6 Return number of bytes written, add address match getter 2022-11-14 11:22:14 +01:00
kalkyl
eba42cb5f4 embassy-nrf: Add TWIS module 2022-11-13 22:15:19 +01:00
Christian Perez Llamas
4fe834db2f Mono channels 2022-11-13 02:48:07 +01:00
Henrik Alsér
5cfad3f853 Feature gate UARTE disable 2022-11-13 02:37:23 +01:00
Christian Perez Llamas
17857bc18f Minor changes 2022-11-13 02:12:58 +01:00
Henrik Alsér
dca11095e2 Disable UARTE in embassy-nrf::init 2022-11-13 01:49:55 +01:00
Christian Perez Llamas
d2e8794f29 Investigating discontinuities in the signal 2022-11-13 01:41:32 +01:00
Christian Perez Llamas
122a31d208 Interrupts, async, sine oscillator 2022-11-12 18:48:57 +01:00