aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | nrf/qspi: add nrf53 support.Dario Nieuwenhuis2023-03-053-20/+26
| | | |
| | * | nrf/qspi: remove cfg_if hackDario Nieuwenhuis2023-03-051-30/+31
| | | |
| * | | nrf/buffered_uarte: add HIL tests.Dario Nieuwenhuis2023-03-041-1/+1
| | | |
| * | | nrf/buffered_uarte: make available on stable.Dario Nieuwenhuis2023-03-042-44/+116
| | | |
| * | | nrf/buffered_uarte: remove PeripheralMutex, make it work without rts/cts.Dario Nieuwenhuis2023-03-042-299/+378
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > dirbaio: so I was checking how zephyr does UARTE RX on nRF > dirbaio: because currently we have the ugly "restart DMA on line idle to flush it" hack > dirbaio: because according to the docs "For each byte received over the RXD line, an RXDRDY event will be generated. This event is likely to occur before the corresponding data has been transferred to Data RAM." > dirbaio: so as I understood it, the only way to guarantee the data is actually transferred to RAM is to stop+restart DMA > dirbaio: well, guess what? > dirbaio: they just count RXDRDY's, and process that amount of data without restarting DMA > dirbaio: with a timer configured as counter https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/serial/uart_nrfx_uarte.c#L650-L692 > dirbaio: 🤔🤷⁉️ > dirbaio: someone saying you can do the "hook up rxdrdy to a counter" trick, someone else saying it's wrong 🤪 https://devzone.nordicsemi.com/f/nordic-q-a/28420/uarte-in-circular-mode So we're going to do just that! - BufferedUarte is lock-free now. No PeripheralMutex. - The "restart DMA on line idle to flush it" hack is GONE. This means - It'll work correctly without RTS/CTS now. - It'll have better throughput when using RTS/CTS.
| * | | nrf/timer: add support for counter mode.Dario Nieuwenhuis2023-03-041-5/+38
| | | |
| * | | nrf: add PPI channel group driver.Dario Nieuwenhuis2023-03-043-10/+98
| |/ /
| * / Add `#[must_use]` to all futuresGrant Miller2023-02-241-0/+1
| |/
| * nrf: rename UARTETWISPIn -> SERIALnDario Nieuwenhuis2023-02-213-61/+61
| | | | | | | | | | The UARTETWISPIn naming is quite horrible. With the nRF53, Nordic realized this and renamed the interrupts to SERIALn. Let's copy that for our peripheral names, in nrf53 and nrf91.
| * nrf: warn if uicr configuration could not be written.Dario Nieuwenhuis2023-02-201-13/+65
| | | | | | | | | | | | | | | | If the user requests some configuration, but UICR is already programmed to something else, detect this and warn the user. We don't do it for the debug port settings, because if they are wrong then the user will simply not be able to read debug logs.
| * nrf: add support for UICR configuration.Dario Nieuwenhuis2023-02-2010-6/+206
| | | | | | | | | | | | | | | | | | - APPROTECT enable/disable. Notably this fixes issues with nrf52-rev3 and nrf53 from locking itself at reset. - Use NFC pins as GPIO. - Use RESET pin as GPIO. NFC and RESET pins singletons are made available only when usable as GPIO, for compile-time checking.
| * nrf/qspi: do not panic when canceling futures.Dario Nieuwenhuis2023-02-101-16/+16
| |
| * nrf/twis: FIx doc typoDario Nieuwenhuis2023-02-011-1/+1
| |
| * nrf: docs.Dario Nieuwenhuis2023-02-0127-220/+602
| |
| * usb: docsDario Nieuwenhuis2023-01-311-4/+4
| |
| * Replace `Level: Into<bool>` with `From<Level>`Joakim Hulthe2023-01-231-3/+3
| | | | | | | | This automatically implements Into<bool> for Level
| * Stop sampling when exiting the Saadc methodshuntc2023-01-181-3/+9
| | | | | | | | Prior to this commit, the onDrop function was being dropped immediately and not on exiting the Saadc sampling methods.
| * Refactor embassy-usb address handling to allow reordering of status resoponsechemicstry2023-01-111-5/+5
| |
| * Provides a means of obtaining the current WDT confighuntc2023-01-041-0/+24
| | | | | | | | 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.
| * Fix a typoKentaro Okuda2022-12-301-1/+1
| |
| * Add Clone & Copy on embassy_nrf::gpio::LevelMatthias Devlamynck2022-12-291-1/+1
| |
| * nrf/uart: do not error on zero length transfers.Dario Nieuwenhuis2022-12-151-10/+10
| | | | | | | | | | | | It's a perfectly fine thing to do, should be just a noop. Erroring is really annoying when you're writing a payload to uart that might be zero-length or not.
| * Merge branch 'master' into nrf91/53-nvmcDion Dokter2022-12-0920-351/+2795
| |\
| | * Merge #1049bors[bot]2022-12-095-3/+1161
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1049: embassy-nrf: Add I2S module r=lulf a=chris-zen This PR adds I2S support for the nrf52 series (`nrf52832`, `nrf52833`, `nrf52840`). We could only test it in a `nrf52840` in master mode for an output stream (see `i2s_waveform` example), using a clone of the [Adafruit I2S Stereo Decoder - UDA1334A](https://learn.adafruit.com/adafruit-i2s-stereo-decoder-uda1334a/overview). We were wondering if this could be a welcome addition to embassy, as we are working on this very informally and don't have much free time for it. <img src="https://user-images.githubusercontent.com/932644/202316127-a8cf90ef-1e1a-4e1d-b796-961b8ad6cef5.png" width="600"> https://user-images.githubusercontent.com/932644/202316609-e53cd912-e463-4e01-839e-0bbdf37020da.mp4 Co-authored-by: `@brainstorm` <[email protected]> Co-authored-by: Christian Perez Llamas <[email protected]> Co-authored-by: Roman Valls Guimera <[email protected]>
| | | * Move the responsibility to manage buffers to the I2S streamChristian Perez Llamas2022-12-081-45/+112
| | | |
| | | * Optimization to be able to work with only 2 buffersChristian Perez Llamas2022-11-291-14/+34
| | | |
| | | * Use &mut self for start methodsChristian Perez Llamas2022-11-261-3/+6
| | | |
| | | * Buffer management in line with other peripherals. Constructor and config ↵Christian Perez Llamas2022-11-191-384/+331
| | | | | | | | | | | | | | | | redesign
| | | * Fix fmtChristian Perez Llamas2022-11-191-1/+1
| | | |
| | | * Fix buildChristian Perez Llamas2022-11-194-8/+15
| | | |
| | | * Add missing parts and CleanupChristian Perez Llamas2022-11-191-83/+466
| | | |
| | | * Fix buffer overrunsChristian Perez Llamas2022-11-171-182/+237
| | | |
| | | * Minor changesChristian Perez Llamas2022-11-131-4/+5
| | | |
| | | * Investigating discontinuities in the signalChristian Perez Llamas2022-11-131-20/+48
| | | |
| | | * Interrupts, async, sine oscillatorChristian Perez Llamas2022-11-122-80/+218
| | | |
| | | * Cargo fmtRoman Valls Guimera2022-11-111-5/+1
| | | |
| | | * Restrict to pacs supporting i2sChristian Perez Llamas2022-11-101-1/+5
| | | |
| | | * Add input rxChristian Perez Llamas2022-11-101-8/+51
| | | |
| | | * Buffer trait. Simpler config.Christian Perez Llamas2022-11-101-58/+64
| | | |
| | | * Apply configChristian Perez Llamas2022-11-091-21/+64
| | | |
| | | * Make bors grin ;)Roman Valls Guimera2022-11-091-20/+27
| | | |
| | | * Draft: Initial support for I2S with a working example.Christian Perez Llamas2022-11-093-0/+410
| | | | | | | | | | | | | | | | Co-authored-by: @brainstorm <[email protected]>
| | * | Switch to async-fn-in-traitDario Nieuwenhuis2022-11-257-343/+257
| | | |
| | * | Merge #1069bors[bot]2022-11-231-5/+8
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1069: GPIOTE InputChannel with mutable reference. r=Dirbaio a=Ardelean-Calin 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 p = embassy_nrf::init(config); 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 p = embassy_nrf::init(config); 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, ); ``` therefore not giving ownership to GPIOTE_CH0. Co-authored-by: Ardelean Călin Petru <[email protected]> Co-authored-by: Ardelean Calin <[email protected]>
| | | * | Review comments. Corrected unused fields.Ardelean Calin2022-11-231-19/+19
| | | | |
| | | * | Corrected order of use statements.Ardelean Calin2022-11-221-1/+1
| | | | |
| | | * | Changed pin to private as it is for OutputChannelArdelean Calin2022-11-221-6/+6
| | | | |
| | | * | Switched to PeripheralRef for channel.Ardelean Calin2022-11-221-23/+20
| | | | |
| | | * | Update gpiote.rsArdelean Călin Petru2022-11-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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, ); ```
| | * | | Merge #1056bors[bot]2022-11-2212-0/+789
| | |\ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1056: embassy-nrf: Add TWIS module r=Dirbaio a=kalkyl Verified to be working on nrf9160 Co-authored-by: kalkyl <[email protected]> Co-authored-by: Henrik Alsér <[email protected]>