forked from embassy-rs/embassy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
1,502 additions
and
984 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Changelog for embassy-nrf | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## Unreleased | ||
|
||
- Drop `sealed` mod | ||
- nrf52840: Add dcdc voltage parameter to configure REG0 regulator | ||
- radio: Add support for IEEE 802.15.4 and BLE via radio peripheral | ||
- spim: Reduce trace-level messages ("Copying SPIM tx buffer..") | ||
- uart: Add support for rx- or tx-only BufferedUart | ||
- uart: Implement splitting Rx/Tx | ||
- spi: Allow specifying OutputDrive for SPI spins | ||
- pdm: Fix gain register value derivation | ||
- spim: Implement chunked DMA transfers | ||
- spi: Add bounds checks for EasyDMA buffer size | ||
- uarte: Add support for handling RX errors | ||
- nrf51: Implement support for nrf51 chip | ||
- pwm: Expose `duty` method | ||
- pwm: Fix infinite loop | ||
- spi: Add support for configuring bit order for bus | ||
- pwm: Expose `pwm::PWM_CLK_HZ` and add `is_enabled` method | ||
- gpio: Drop GPIO Pin generics (API break) | ||
|
||
## 0.1.0 - 2024-01-12 | ||
|
||
- First release with support for following NRF chips: | ||
- nrf52805 | ||
- nrf52810 | ||
- nrf52811 | ||
- nrf52820 | ||
- nrf52832 | ||
- nrf52833 | ||
- nrf52840 | ||
- nrf5340 | ||
- nrf9160 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
use embassy_hal_internal::PeripheralRef; | ||
|
||
use super::word::Word; | ||
use super::{AnyChannel, Request, Transfer, TransferOptions}; | ||
|
||
/// Convenience wrapper, contains a channel and a request number. | ||
/// | ||
/// Commonly used in peripheral drivers that own DMA channels. | ||
pub(crate) struct ChannelAndRequest<'d> { | ||
pub channel: PeripheralRef<'d, AnyChannel>, | ||
pub request: Request, | ||
} | ||
|
||
impl<'d> ChannelAndRequest<'d> { | ||
pub unsafe fn read<'a, W: Word>( | ||
&'a mut self, | ||
peri_addr: *mut W, | ||
buf: &'a mut [W], | ||
options: TransferOptions, | ||
) -> Transfer<'a> { | ||
Transfer::new_read(&mut self.channel, self.request, peri_addr, buf, options) | ||
} | ||
|
||
pub unsafe fn read_raw<'a, W: Word>( | ||
&'a mut self, | ||
peri_addr: *mut W, | ||
buf: *mut [W], | ||
options: TransferOptions, | ||
) -> Transfer<'a> { | ||
Transfer::new_read_raw(&mut self.channel, self.request, peri_addr, buf, options) | ||
} | ||
|
||
pub unsafe fn write<'a, W: Word>( | ||
&'a mut self, | ||
buf: &'a [W], | ||
peri_addr: *mut W, | ||
options: TransferOptions, | ||
) -> Transfer<'a> { | ||
Transfer::new_write(&mut self.channel, self.request, buf, peri_addr, options) | ||
} | ||
|
||
pub unsafe fn write_raw<'a, W: Word>( | ||
&'a mut self, | ||
buf: *const [W], | ||
peri_addr: *mut W, | ||
options: TransferOptions, | ||
) -> Transfer<'a> { | ||
Transfer::new_write_raw(&mut self.channel, self.request, buf, peri_addr, options) | ||
} | ||
|
||
pub unsafe fn write_repeated<'a, W: Word>( | ||
&'a mut self, | ||
repeated: &'a W, | ||
count: usize, | ||
peri_addr: *mut W, | ||
options: TransferOptions, | ||
) -> Transfer<'a> { | ||
Transfer::new_write_repeated(&mut self.channel, self.request, repeated, count, peri_addr, options) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.