ci: fix nrf, rp tests.
This commit is contained in:
@ -16,6 +16,18 @@ flavors = [
|
||||
]
|
||||
|
||||
[features]
|
||||
default = [
|
||||
"nrf52805-pac?/rt",
|
||||
"nrf52810-pac?/rt",
|
||||
"nrf52811-pac?/rt",
|
||||
"nrf52820-pac?/rt",
|
||||
"nrf52832-pac?/rt",
|
||||
"nrf52833-pac?/rt",
|
||||
"nrf52840-pac?/rt",
|
||||
"nrf5340-app-pac?/rt",
|
||||
"nrf5340-net-pac?/rt",
|
||||
"nrf9160-pac?/rt",
|
||||
]
|
||||
|
||||
time = ["dep:embassy-time"]
|
||||
|
||||
@ -103,13 +115,14 @@ embedded-storage = "0.3.0"
|
||||
embedded-storage-async = { version = "0.4.0", optional = true }
|
||||
cfg-if = "1.0.0"
|
||||
|
||||
nrf52805-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf52810-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf52811-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf52820-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf52832-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf52833-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf52840-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf5340-app-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf5340-net-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf9160-pac = { version = "0.12.0", optional = true, features = [ "rt" ] }
|
||||
nrf52805-pac = { version = "0.12.0", optional = true }
|
||||
nrf52810-pac = { version = "0.12.0", optional = true }
|
||||
nrf52811-pac = { version = "0.12.0", optional = true }
|
||||
nrf52820-pac = { version = "0.12.0", optional = true }
|
||||
nrf52832-pac = { version = "0.12.0", optional = true }
|
||||
nrf52833-pac = { version = "0.12.0", optional = true }
|
||||
nrf52840-pac = { version = "0.12.0", optional = true }
|
||||
nrf5340-app-pac = { version = "0.12.0", optional = true }
|
||||
nrf5340-net-pac = { version = "0.12.0", optional = true }
|
||||
nrf9160-pac = { version = "0.12.0", optional = true }
|
||||
|
||||
|
@ -13,7 +13,7 @@ with peripherals. It takes care of sending/receiving data over a variety of bus
|
||||
However, EasyDMA requires the buffers used to transmit and receive data to reside in RAM. Unfortunately, Rust
|
||||
slices will not always do so. The following example using the SPI peripheral shows a common situation where this might happen:
|
||||
|
||||
```no_run
|
||||
```rust,ignore
|
||||
// As we pass a slice to the function whose contents will not ever change,
|
||||
// the compiler writes it into the flash and thus the pointer to it will
|
||||
// reference static memory. Since EasyDMA requires slices to reside in RAM,
|
||||
|
@ -154,10 +154,19 @@ impl<'d, T: Instance> Qdec<'d, T> {
|
||||
/// # Example
|
||||
///
|
||||
/// ```no_run
|
||||
/// let irq = interrupt::take!(QDEC);
|
||||
/// use embassy_nrf::qdec::{self, Qdec};
|
||||
/// use embassy_nrf::{bind_interrupts, peripherals};
|
||||
///
|
||||
/// bind_interrupts!(struct Irqs {
|
||||
/// QDEC => qdec::InterruptHandler<peripherals::QDEC>;
|
||||
/// });
|
||||
///
|
||||
/// # async {
|
||||
/// # let p: embassy_nrf::Peripherals = todo!();
|
||||
/// let config = qdec::Config::default();
|
||||
/// let mut q = Qdec::new(p.QDEC, p.P0_31, p.P0_30, config);
|
||||
/// let mut q = Qdec::new(p.QDEC, Irqs, p.P0_31, p.P0_30, config);
|
||||
/// let delta = q.read().await;
|
||||
/// # };
|
||||
/// ```
|
||||
pub async fn read(&mut self) -> i16 {
|
||||
let t = T::regs();
|
||||
|
@ -56,8 +56,19 @@ impl<'d> Temp<'d> {
|
||||
/// # Example
|
||||
///
|
||||
/// ```no_run
|
||||
/// let mut t = Temp::new(p.TEMP, interrupt::take!(TEMP));
|
||||
/// use embassy_nrf::{bind_interrupts, temp};
|
||||
/// use embassy_nrf::temp::Temp;
|
||||
/// use embassy_time::{Duration, Timer};
|
||||
///
|
||||
/// bind_interrupts!(struct Irqs {
|
||||
/// TEMP => temp::InterruptHandler;
|
||||
/// });
|
||||
///
|
||||
/// # async {
|
||||
/// # let p: embassy_nrf::Peripherals = todo!();
|
||||
/// let mut t = Temp::new(p.TEMP, Irqs);
|
||||
/// let v: u16 = t.read().await.to_num::<u16>();
|
||||
/// # };
|
||||
/// ```
|
||||
pub async fn read(&mut self) -> I30F2 {
|
||||
// In case the future is dropped, stop the task and reset events.
|
||||
|
Reference in New Issue
Block a user