mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
Update to embedded-io 0.5 (#1752)
This commit is contained in:
parent
77844e2055
commit
5d5cd23715
14
ci.sh
14
ci.sh
@ -20,25 +20,19 @@ cargo batch \
|
|||||||
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,defmt \
|
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,defmt \
|
||||||
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \
|
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \
|
||||||
--- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \
|
--- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \
|
||||||
--- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features nightly,unstable-traits,defmt,defmt-timestamp-uptime,tick-hz-32_768,generic-queue-8 \
|
--- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt,defmt-timestamp-uptime,tick-hz-32_768,generic-queue-8 \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,unstable-traits \
|
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,nightly \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,nightly \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,unstable-traits,nightly \
|
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ieee802154 \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ieee802154 \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,medium-ieee802154 \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,medium-ieee802154 \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits \
|
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,nightly \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,nightly \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits,nightly \
|
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet,unstable-traits \
|
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet,nightly \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet,nightly \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ethernet,unstable-traits,nightly \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,nightly \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,unstable-traits,nightly \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,medium-ethernet,nightly \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,medium-ethernet,unstable-traits,nightly \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,medium-ethernet,medium-ieee802154,nightly \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,proto-ipv6,medium-ip,medium-ethernet,medium-ieee802154,unstable-traits,nightly \
|
|
||||||
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52805,gpiote,time-driver-rtc1 \
|
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52805,gpiote,time-driver-rtc1 \
|
||||||
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52810,gpiote,time-driver-rtc1 \
|
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52810,gpiote,time-driver-rtc1 \
|
||||||
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52811,gpiote,time-driver-rtc1 \
|
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52811,gpiote,time-driver-rtc1 \
|
||||||
|
@ -16,9 +16,7 @@ cargo batch \
|
|||||||
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features defmt \
|
--- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features defmt \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,unstable-traits \
|
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \
|
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \
|
||||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits \
|
|
||||||
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52805,gpiote,time-driver-rtc1 \
|
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52805,gpiote,time-driver-rtc1 \
|
||||||
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52810,gpiote,time-driver-rtc1 \
|
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52810,gpiote,time-driver-rtc1 \
|
||||||
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52811,gpiote,time-driver-rtc1 \
|
--- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52811,gpiote,time-driver-rtc1 \
|
||||||
|
@ -14,11 +14,11 @@ categories = [
|
|||||||
[package.metadata.embassy_docs]
|
[package.metadata.embassy_docs]
|
||||||
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/"
|
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/"
|
||||||
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/"
|
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/"
|
||||||
features = ["nightly", "unstable-traits", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"]
|
features = ["nightly", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"]
|
||||||
target = "thumbv7em-none-eabi"
|
target = "thumbv7em-none-eabi"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["nightly", "unstable-traits", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"]
|
features = ["nightly", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
@ -26,8 +26,7 @@ std = []
|
|||||||
|
|
||||||
defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt"]
|
defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt"]
|
||||||
|
|
||||||
nightly = ["dep:embedded-io", "embedded-io?/async", "dep:embedded-nal-async"]
|
nightly = ["dep:embedded-io-async", "dep:embedded-nal-async"]
|
||||||
unstable-traits = []
|
|
||||||
|
|
||||||
udp = ["smoltcp/socket-udp"]
|
udp = ["smoltcp/socket-udp"]
|
||||||
tcp = ["smoltcp/socket-tcp"]
|
tcp = ["smoltcp/socket-tcp"]
|
||||||
@ -53,7 +52,7 @@ smoltcp = { version = "0.10.0", default-features = false, features = [
|
|||||||
embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" }
|
embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" }
|
||||||
embassy-time = { version = "0.1.2", path = "../embassy-time" }
|
embassy-time = { version = "0.1.2", path = "../embassy-time" }
|
||||||
embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
|
embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
|
||||||
embedded-io = { version = "0.4.0", optional = true }
|
embedded-io-async = { version = "0.5.0", optional = true }
|
||||||
|
|
||||||
managed = { version = "0.8.0", default-features = false, features = [ "map" ] }
|
managed = { version = "0.8.0", default-features = false, features = [ "map" ] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.7.5", default-features = false }
|
||||||
@ -62,5 +61,5 @@ generic-array = { version = "0.14.4", default-features = false }
|
|||||||
stable_deref_trait = { version = "1.2.0", default-features = false }
|
stable_deref_trait = { version = "1.2.0", default-features = false }
|
||||||
futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] }
|
futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] }
|
||||||
atomic-pool = "1.0"
|
atomic-pool = "1.0"
|
||||||
embedded-nal-async = { version = "0.4.0", optional = true }
|
embedded-nal-async = { version = "0.5.0", optional = true }
|
||||||
atomic-polyfill = { version = "1.0" }
|
atomic-polyfill = { version = "1.0" }
|
||||||
|
@ -68,7 +68,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "unstable-traits", feature = "nightly"))]
|
#[cfg(feature = "nightly")]
|
||||||
impl<'a, D> embedded_nal_async::Dns for DnsSocket<'a, D>
|
impl<'a, D> embedded_nal_async::Dns for DnsSocket<'a, D>
|
||||||
where
|
where
|
||||||
D: Driver + 'static,
|
D: Driver + 'static,
|
||||||
|
@ -382,29 +382,29 @@ impl<'d> TcpIo<'d> {
|
|||||||
mod embedded_io_impls {
|
mod embedded_io_impls {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
impl embedded_io::Error for ConnectError {
|
impl embedded_io_async::Error for ConnectError {
|
||||||
fn kind(&self) -> embedded_io::ErrorKind {
|
fn kind(&self) -> embedded_io_async::ErrorKind {
|
||||||
embedded_io::ErrorKind::Other
|
embedded_io_async::ErrorKind::Other
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl embedded_io::Error for Error {
|
impl embedded_io_async::Error for Error {
|
||||||
fn kind(&self) -> embedded_io::ErrorKind {
|
fn kind(&self) -> embedded_io_async::ErrorKind {
|
||||||
embedded_io::ErrorKind::Other
|
embedded_io_async::ErrorKind::Other
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d> embedded_io::Io for TcpSocket<'d> {
|
impl<'d> embedded_io_async::ErrorType for TcpSocket<'d> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d> embedded_io::asynch::Read for TcpSocket<'d> {
|
impl<'d> embedded_io_async::Read for TcpSocket<'d> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
self.io.read(buf).await
|
self.io.read(buf).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d> embedded_io::asynch::Write for TcpSocket<'d> {
|
impl<'d> embedded_io_async::Write for TcpSocket<'d> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
self.io.write(buf).await
|
self.io.write(buf).await
|
||||||
}
|
}
|
||||||
@ -414,21 +414,21 @@ mod embedded_io_impls {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d> embedded_io::Io for TcpReader<'d> {
|
impl<'d> embedded_io_async::ErrorType for TcpReader<'d> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d> embedded_io::asynch::Read for TcpReader<'d> {
|
impl<'d> embedded_io_async::Read for TcpReader<'d> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
self.io.read(buf).await
|
self.io.read(buf).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d> embedded_io::Io for TcpWriter<'d> {
|
impl<'d> embedded_io_async::ErrorType for TcpWriter<'d> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d> embedded_io::asynch::Write for TcpWriter<'d> {
|
impl<'d> embedded_io_async::Write for TcpWriter<'d> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
self.io.write(buf).await
|
self.io.write(buf).await
|
||||||
}
|
}
|
||||||
@ -440,7 +440,7 @@ mod embedded_io_impls {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// TCP client compatible with `embedded-nal-async` traits.
|
/// TCP client compatible with `embedded-nal-async` traits.
|
||||||
#[cfg(all(feature = "unstable-traits", feature = "nightly"))]
|
#[cfg(feature = "nightly")]
|
||||||
pub mod client {
|
pub mod client {
|
||||||
use core::cell::UnsafeCell;
|
use core::cell::UnsafeCell;
|
||||||
use core::mem::MaybeUninit;
|
use core::mem::MaybeUninit;
|
||||||
@ -527,13 +527,13 @@ pub mod client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io::Io
|
impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io_async::ErrorType
|
||||||
for TcpConnection<'d, N, TX_SZ, RX_SZ>
|
for TcpConnection<'d, N, TX_SZ, RX_SZ>
|
||||||
{
|
{
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io::asynch::Read
|
impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io_async::Read
|
||||||
for TcpConnection<'d, N, TX_SZ, RX_SZ>
|
for TcpConnection<'d, N, TX_SZ, RX_SZ>
|
||||||
{
|
{
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
@ -541,7 +541,7 @@ pub mod client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io::asynch::Write
|
impl<'d, const N: usize, const TX_SZ: usize, const RX_SZ: usize> embedded_io_async::Write
|
||||||
for TcpConnection<'d, N, TX_SZ, RX_SZ>
|
for TcpConnection<'d, N, TX_SZ, RX_SZ>
|
||||||
{
|
{
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
|
@ -32,10 +32,10 @@ rt = [
|
|||||||
|
|
||||||
time = ["dep:embassy-time"]
|
time = ["dep:embassy-time"]
|
||||||
|
|
||||||
defmt = ["dep:defmt", "embassy-sync/defmt", "embassy-usb-driver?/defmt", "embedded-io?/defmt", "embassy-embedded-hal/defmt"]
|
defmt = ["dep:defmt", "embassy-sync/defmt", "embassy-usb-driver?/defmt", "embassy-embedded-hal/defmt"]
|
||||||
|
|
||||||
# Enable nightly-only features
|
# Enable nightly-only features
|
||||||
nightly = ["embedded-hal-1", "embedded-hal-async", "dep:embassy-usb-driver", "embedded-storage-async", "dep:embedded-io", "embassy-embedded-hal/nightly"]
|
nightly = ["embedded-hal-1", "embedded-hal-async", "dep:embassy-usb-driver", "embedded-storage-async", "dep:embedded-io-async", "embassy-embedded-hal/nightly"]
|
||||||
|
|
||||||
# Reexport the PAC for the currently enabled chip at `embassy_nrf::pac`.
|
# Reexport the PAC for the currently enabled chip at `embassy_nrf::pac`.
|
||||||
# This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version.
|
# This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version.
|
||||||
@ -100,7 +100,8 @@ embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optiona
|
|||||||
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
|
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
|
||||||
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11", optional = true}
|
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11", optional = true}
|
||||||
embedded-hal-async = { version = "=0.2.0-alpha.2", optional = true}
|
embedded-hal-async = { version = "=0.2.0-alpha.2", optional = true}
|
||||||
embedded-io = { version = "0.4.0", features = ["async"], optional = true }
|
embedded-io = { version = "0.5.0" }
|
||||||
|
embedded-io-async = { version = "0.5.0", optional = true }
|
||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
log = { version = "0.4.14", optional = true }
|
log = { version = "0.4.14", optional = true }
|
||||||
|
@ -572,37 +572,37 @@ impl<'u, 'd, U: UarteInstance, T: TimerInstance> BufferedUarteRx<'u, 'd, U, T> {
|
|||||||
mod _embedded_io {
|
mod _embedded_io {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
impl embedded_io::Error for Error {
|
impl embedded_io_async::Error for Error {
|
||||||
fn kind(&self) -> embedded_io::ErrorKind {
|
fn kind(&self) -> embedded_io_async::ErrorKind {
|
||||||
match *self {}
|
match *self {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, U: UarteInstance, T: TimerInstance> embedded_io::Io for BufferedUarte<'d, U, T> {
|
impl<'d, U: UarteInstance, T: TimerInstance> embedded_io_async::ErrorType for BufferedUarte<'d, U, T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'u, 'd, U: UarteInstance, T: TimerInstance> embedded_io::Io for BufferedUarteRx<'u, 'd, U, T> {
|
impl<'u, 'd, U: UarteInstance, T: TimerInstance> embedded_io_async::ErrorType for BufferedUarteRx<'u, 'd, U, T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'u, 'd, U: UarteInstance, T: TimerInstance> embedded_io::Io for BufferedUarteTx<'u, 'd, U, T> {
|
impl<'u, 'd, U: UarteInstance, T: TimerInstance> embedded_io_async::ErrorType for BufferedUarteTx<'u, 'd, U, T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, U: UarteInstance, T: TimerInstance> embedded_io::asynch::Read for BufferedUarte<'d, U, T> {
|
impl<'d, U: UarteInstance, T: TimerInstance> embedded_io_async::Read for BufferedUarte<'d, U, T> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
self.inner_read(buf).await
|
self.inner_read(buf).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io::asynch::Read for BufferedUarteRx<'u, 'd, U, T> {
|
impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io_async::Read for BufferedUarteRx<'u, 'd, U, T> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
self.inner.inner_read(buf).await
|
self.inner.inner_read(buf).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, U: UarteInstance, T: TimerInstance> embedded_io::asynch::BufRead for BufferedUarte<'d, U, T> {
|
impl<'d, U: UarteInstance, T: TimerInstance> embedded_io_async::BufRead for BufferedUarte<'d, U, T> {
|
||||||
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
||||||
self.inner_fill_buf().await
|
self.inner_fill_buf().await
|
||||||
}
|
}
|
||||||
@ -612,7 +612,7 @@ mod _embedded_io {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io::asynch::BufRead for BufferedUarteRx<'u, 'd, U, T> {
|
impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io_async::BufRead for BufferedUarteRx<'u, 'd, U, T> {
|
||||||
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
||||||
self.inner.inner_fill_buf().await
|
self.inner.inner_fill_buf().await
|
||||||
}
|
}
|
||||||
@ -622,7 +622,7 @@ mod _embedded_io {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, U: UarteInstance, T: TimerInstance> embedded_io::asynch::Write for BufferedUarte<'d, U, T> {
|
impl<'d, U: UarteInstance, T: TimerInstance> embedded_io_async::Write for BufferedUarte<'d, U, T> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
self.inner_write(buf).await
|
self.inner_write(buf).await
|
||||||
}
|
}
|
||||||
@ -632,7 +632,7 @@ mod _embedded_io {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io::asynch::Write for BufferedUarteTx<'u, 'd, U, T> {
|
impl<'u, 'd: 'u, U: UarteInstance, T: TimerInstance> embedded_io_async::Write for BufferedUarteTx<'u, 'd, U, T> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
self.inner.inner_write(buf).await
|
self.inner.inner_write(buf).await
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ qspi-as-gpio = []
|
|||||||
run-from-ram = []
|
run-from-ram = []
|
||||||
|
|
||||||
# Enable nightly-only features
|
# Enable nightly-only features
|
||||||
nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io"]
|
nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io-async"]
|
||||||
|
|
||||||
# Implement embedded-hal 1.0 alpha traits.
|
# Implement embedded-hal 1.0 alpha traits.
|
||||||
# Implement embedded-hal-async traits if `nightly` is set as well.
|
# Implement embedded-hal-async traits if `nightly` is set as well.
|
||||||
@ -75,7 +75,8 @@ cortex-m = "0.7.6"
|
|||||||
critical-section = "1.1"
|
critical-section = "1.1"
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
chrono = { version = "0.4", default-features = false, optional = true }
|
chrono = { version = "0.4", default-features = false, optional = true }
|
||||||
embedded-io = { version = "0.4.0", features = ["async"], optional = true }
|
embedded-io = { version = "0.5.0" }
|
||||||
|
embedded-io-async = { version = "0.5.0", optional = true }
|
||||||
embedded-storage = { version = "0.3" }
|
embedded-storage = { version = "0.3" }
|
||||||
embedded-storage-async = { version = "0.4.0", optional = true }
|
embedded-storage-async = { version = "0.4.0", optional = true }
|
||||||
rand_core = "0.6.4"
|
rand_core = "0.6.4"
|
||||||
|
@ -574,31 +574,31 @@ impl embedded_io::Error for Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> embedded_io::Io for BufferedUart<'d, T> {
|
impl<'d, T: Instance> embedded_io_async::ErrorType for BufferedUart<'d, T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> embedded_io::Io for BufferedUartRx<'d, T> {
|
impl<'d, T: Instance> embedded_io_async::ErrorType for BufferedUartRx<'d, T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> embedded_io::Io for BufferedUartTx<'d, T> {
|
impl<'d, T: Instance> embedded_io_async::ErrorType for BufferedUartTx<'d, T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::asynch::Read for BufferedUart<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io_async::Read for BufferedUart<'d, T> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
BufferedUartRx::<'d, T>::read(buf).await
|
BufferedUartRx::<'d, T>::read(buf).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::asynch::Read for BufferedUartRx<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io_async::Read for BufferedUartRx<'d, T> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
Self::read(buf).await
|
Self::read(buf).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUart<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io_async::BufRead for BufferedUart<'d, T> {
|
||||||
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
||||||
BufferedUartRx::<'d, T>::fill_buf().await
|
BufferedUartRx::<'d, T>::fill_buf().await
|
||||||
}
|
}
|
||||||
@ -608,7 +608,7 @@ impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUart<'d, T>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUartRx<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io_async::BufRead for BufferedUartRx<'d, T> {
|
||||||
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
||||||
Self::fill_buf().await
|
Self::fill_buf().await
|
||||||
}
|
}
|
||||||
@ -618,7 +618,7 @@ impl<'d, T: Instance + 'd> embedded_io::asynch::BufRead for BufferedUartRx<'d, T
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUart<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io_async::Write for BufferedUart<'d, T> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
BufferedUartTx::<'d, T>::write(buf).await
|
BufferedUartTx::<'d, T>::write(buf).await
|
||||||
}
|
}
|
||||||
@ -628,7 +628,7 @@ impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUart<'d, T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUartTx<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io_async::Write for BufferedUartTx<'d, T> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
Self::write(buf).await
|
Self::write(buf).await
|
||||||
}
|
}
|
||||||
@ -638,19 +638,19 @@ impl<'d, T: Instance + 'd> embedded_io::asynch::Write for BufferedUartTx<'d, T>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::blocking::Read for BufferedUart<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io::Read for BufferedUart<'d, T> {
|
||||||
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
self.rx.blocking_read(buf)
|
self.rx.blocking_read(buf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::blocking::Read for BufferedUartRx<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io::Read for BufferedUartRx<'d, T> {
|
||||||
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
self.blocking_read(buf)
|
self.blocking_read(buf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::blocking::Write for BufferedUart<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io::Write for BufferedUart<'d, T> {
|
||||||
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
self.tx.blocking_write(buf)
|
self.tx.blocking_write(buf)
|
||||||
}
|
}
|
||||||
@ -660,7 +660,7 @@ impl<'d, T: Instance + 'd> embedded_io::blocking::Write for BufferedUart<'d, T>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance + 'd> embedded_io::blocking::Write for BufferedUartTx<'d, T> {
|
impl<'d, T: Instance + 'd> embedded_io::Write for BufferedUartTx<'d, T> {
|
||||||
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
self.blocking_write(buf)
|
self.blocking_write(buf)
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,8 @@ nb = "1.0.0"
|
|||||||
stm32-fmc = "0.2.4"
|
stm32-fmc = "0.2.4"
|
||||||
seq-macro = "0.3.0"
|
seq-macro = "0.3.0"
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
embedded-io = { version = "0.4.0", features = ["async"], optional = true }
|
embedded-io = { version = "0.5.0" }
|
||||||
|
embedded-io-async = { version = "0.5.0", optional = true }
|
||||||
chrono = { version = "^0.4", default-features = false, optional = true}
|
chrono = { version = "^0.4", default-features = false, optional = true}
|
||||||
bit_field = "0.10.2"
|
bit_field = "0.10.2"
|
||||||
document-features = "0.2.7"
|
document-features = "0.2.7"
|
||||||
@ -84,7 +85,7 @@ default = ["rt"]
|
|||||||
rt = ["stm32-metapac/rt"]
|
rt = ["stm32-metapac/rt"]
|
||||||
|
|
||||||
## Use [`defmt`](https://docs.rs/defmt/latest/defmt/) for logging
|
## Use [`defmt`](https://docs.rs/defmt/latest/defmt/) for logging
|
||||||
defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy-sync/defmt", "embassy-embedded-hal/defmt", "embassy-hal-internal/defmt", "embedded-io?/defmt", "embassy-usb-driver?/defmt", "embassy-net-driver/defmt", "embassy-time?/defmt"]
|
defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy-sync/defmt", "embassy-embedded-hal/defmt", "embassy-hal-internal/defmt", "embedded-io-async?/defmt-03", "embassy-usb-driver?/defmt", "embassy-net-driver/defmt", "embassy-time?/defmt"]
|
||||||
|
|
||||||
exti = []
|
exti = []
|
||||||
|
|
||||||
@ -92,7 +93,7 @@ exti = []
|
|||||||
memory-x = ["stm32-metapac/memory-x"]
|
memory-x = ["stm32-metapac/memory-x"]
|
||||||
|
|
||||||
## Enable nightly-only features
|
## Enable nightly-only features
|
||||||
nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"]
|
nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io-async", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"]
|
||||||
|
|
||||||
## Re-export stm32-metapac at `embassy_stm32::pac`.
|
## Re-export stm32-metapac at `embassy_stm32::pac`.
|
||||||
## This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version.
|
## This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version.
|
||||||
|
@ -400,37 +400,37 @@ impl<'d, T: BasicInstance> Drop for BufferedUartTx<'d, T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl embedded_io::Error for Error {
|
impl embedded_io_async::Error for Error {
|
||||||
fn kind(&self) -> embedded_io::ErrorKind {
|
fn kind(&self) -> embedded_io_async::ErrorKind {
|
||||||
embedded_io::ErrorKind::Other
|
embedded_io_async::ErrorKind::Other
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::Io for BufferedUart<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io_async::ErrorType for BufferedUart<'d, T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::Io for BufferedUartRx<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io_async::ErrorType for BufferedUartRx<'d, T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::Io for BufferedUartTx<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io_async::ErrorType for BufferedUartTx<'d, T> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::asynch::Read for BufferedUart<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io_async::Read for BufferedUart<'d, T> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
self.rx.read(buf).await
|
self.rx.read(buf).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::asynch::Read for BufferedUartRx<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io_async::Read for BufferedUartRx<'d, T> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
Self::read(self, buf).await
|
Self::read(self, buf).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUart<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io_async::BufRead for BufferedUart<'d, T> {
|
||||||
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
||||||
self.rx.fill_buf().await
|
self.rx.fill_buf().await
|
||||||
}
|
}
|
||||||
@ -440,7 +440,7 @@ impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUart<'d, T>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUartRx<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io_async::BufRead for BufferedUartRx<'d, T> {
|
||||||
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
|
||||||
Self::fill_buf(self).await
|
Self::fill_buf(self).await
|
||||||
}
|
}
|
||||||
@ -450,7 +450,7 @@ impl<'d, T: BasicInstance> embedded_io::asynch::BufRead for BufferedUartRx<'d, T
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUart<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io_async::Write for BufferedUart<'d, T> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
self.tx.write(buf).await
|
self.tx.write(buf).await
|
||||||
}
|
}
|
||||||
@ -460,7 +460,7 @@ impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUart<'d, T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUartTx<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io_async::Write for BufferedUartTx<'d, T> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
Self::write(self, buf).await
|
Self::write(self, buf).await
|
||||||
}
|
}
|
||||||
@ -470,19 +470,19 @@ impl<'d, T: BasicInstance> embedded_io::asynch::Write for BufferedUartTx<'d, T>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::blocking::Read for BufferedUart<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io::Read for BufferedUart<'d, T> {
|
||||||
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
self.rx.blocking_read(buf)
|
self.rx.blocking_read(buf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::blocking::Read for BufferedUartRx<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io::Read for BufferedUartRx<'d, T> {
|
||||||
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
self.blocking_read(buf)
|
self.blocking_read(buf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::blocking::Write for BufferedUart<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io::Write for BufferedUart<'d, T> {
|
||||||
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
self.tx.blocking_write(buf)
|
self.tx.blocking_write(buf)
|
||||||
}
|
}
|
||||||
@ -492,7 +492,7 @@ impl<'d, T: BasicInstance> embedded_io::blocking::Write for BufferedUart<'d, T>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: BasicInstance> embedded_io::blocking::Write for BufferedUartTx<'d, T> {
|
impl<'d, T: BasicInstance> embedded_io::Write for BufferedUartTx<'d, T> {
|
||||||
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
Self::blocking_write(self, buf)
|
Self::blocking_write(self, buf)
|
||||||
}
|
}
|
||||||
|
@ -1022,12 +1022,11 @@ mod eh1 {
|
|||||||
|
|
||||||
#[cfg(all(feature = "unstable-traits", feature = "nightly"))]
|
#[cfg(all(feature = "unstable-traits", feature = "nightly"))]
|
||||||
mod eio {
|
mod eio {
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::{ErrorType, Write};
|
||||||
use embedded_io::Io;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
impl<T, TxDma, RxDma> Io for Uart<'_, T, TxDma, RxDma>
|
impl<T, TxDma, RxDma> ErrorType for Uart<'_, T, TxDma, RxDma>
|
||||||
where
|
where
|
||||||
T: BasicInstance,
|
T: BasicInstance,
|
||||||
{
|
{
|
||||||
@ -1049,7 +1048,7 @@ mod eio {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T, TxDma> Io for UartTx<'_, T, TxDma>
|
impl<T, TxDma> ErrorType for UartTx<'_, T, TxDma>
|
||||||
where
|
where
|
||||||
T: BasicInstance,
|
T: BasicInstance,
|
||||||
{
|
{
|
||||||
|
@ -220,13 +220,12 @@ fn clear_idle_flag(r: Regs) -> Sr {
|
|||||||
|
|
||||||
#[cfg(all(feature = "unstable-traits", feature = "nightly"))]
|
#[cfg(all(feature = "unstable-traits", feature = "nightly"))]
|
||||||
mod eio {
|
mod eio {
|
||||||
use embedded_io::asynch::Read;
|
use embedded_io_async::{ErrorType, Read};
|
||||||
use embedded_io::Io;
|
|
||||||
|
|
||||||
use super::RingBufferedUartRx;
|
use super::RingBufferedUartRx;
|
||||||
use crate::usart::{BasicInstance, Error, RxDma};
|
use crate::usart::{BasicInstance, Error, RxDma};
|
||||||
|
|
||||||
impl<T, Rx> Io for RingBufferedUartRx<'_, T, Rx>
|
impl<T, Rx> ErrorType for RingBufferedUartRx<'_, T, Rx>
|
||||||
where
|
where
|
||||||
T: BasicInstance,
|
T: BasicInstance,
|
||||||
Rx: RxDma<T>,
|
Rx: RxDma<T>,
|
||||||
|
@ -23,7 +23,7 @@ target = "thumbv7em-none-eabi"
|
|||||||
features = ["nightly"]
|
features = ["nightly"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
nightly = ["embedded-io/async"]
|
nightly = ["dep:embedded-io-async"]
|
||||||
std = []
|
std = []
|
||||||
turbowakers = []
|
turbowakers = []
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ futures-util = { version = "0.3.17", default-features = false }
|
|||||||
critical-section = "1.1"
|
critical-section = "1.1"
|
||||||
heapless = "0.7.5"
|
heapless = "0.7.5"
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
embedded-io = "0.4.0"
|
embedded-io-async = { version = "0.5.0", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
futures-executor = { version = "0.3.17", features = [ "thread-pool" ] }
|
futures-executor = { version = "0.3.17", features = [ "thread-pool" ] }
|
||||||
|
@ -381,17 +381,17 @@ mod io_impls {
|
|||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::Io for Pipe<M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for Pipe<M, N> {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::asynch::Read for Pipe<M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::Read for Pipe<M, N> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
Ok(Pipe::read(self, buf).await)
|
Ok(Pipe::read(self, buf).await)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::asynch::Write for Pipe<M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::Write for Pipe<M, N> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
Ok(Pipe::write(self, buf).await)
|
Ok(Pipe::write(self, buf).await)
|
||||||
}
|
}
|
||||||
@ -401,17 +401,17 @@ mod io_impls {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::Io for &Pipe<M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for &Pipe<M, N> {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::asynch::Read for &Pipe<M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::Read for &Pipe<M, N> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
Ok(Pipe::read(self, buf).await)
|
Ok(Pipe::read(self, buf).await)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::asynch::Write for &Pipe<M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::Write for &Pipe<M, N> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
Ok(Pipe::write(self, buf).await)
|
Ok(Pipe::write(self, buf).await)
|
||||||
}
|
}
|
||||||
@ -421,21 +421,21 @@ mod io_impls {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::Io for Reader<'_, M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for Reader<'_, M, N> {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::asynch::Read for Reader<'_, M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::Read for Reader<'_, M, N> {
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
||||||
Ok(Reader::read(self, buf).await)
|
Ok(Reader::read(self, buf).await)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::Io for Writer<'_, M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::ErrorType for Writer<'_, M, N> {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<M: RawMutex, const N: usize> embedded_io::asynch::Write for Writer<'_, M, N> {
|
impl<M: RawMutex, const N: usize> embedded_io_async::Write for Writer<'_, M, N> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
Ok(Writer::write(self, buf).await)
|
Ok(Writer::write(self, buf).await)
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ nightly = [
|
|||||||
"embassy-time/unstable-traits",
|
"embassy-time/unstable-traits",
|
||||||
"static_cell/nightly",
|
"static_cell/nightly",
|
||||||
"embassy-usb",
|
"embassy-usb",
|
||||||
"embedded-io/async",
|
"embedded-io-async",
|
||||||
"embassy-net",
|
"embassy-net",
|
||||||
"embassy-lora",
|
"embassy-lora",
|
||||||
"lora-phy",
|
"lora-phy",
|
||||||
@ -33,7 +33,8 @@ embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["de
|
|||||||
embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||||
embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true }
|
embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true }
|
||||||
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt", "msos-descriptor",], optional = true }
|
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt", "msos-descriptor",], optional = true }
|
||||||
embedded-io = "0.4.0"
|
embedded-io = { version = "0.5.0", features = ["defmt-03"] }
|
||||||
|
embedded-io-async = { version = "0.5.0", optional = true, features = ["defmt-03"] }
|
||||||
embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"], optional = true }
|
embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"], optional = true }
|
||||||
lora-phy = { version = "1", optional = true }
|
lora-phy = { version = "1", optional = true }
|
||||||
lorawan-device = { version = "0.10.0", default-features = false, features = ["async", "external-lora-phy"], optional = true }
|
lorawan-device = { version = "0.10.0", default-features = false, features = ["async", "external-lora-phy"], optional = true }
|
||||||
|
@ -6,7 +6,7 @@ use defmt::*;
|
|||||||
use embassy_executor::Spawner;
|
use embassy_executor::Spawner;
|
||||||
use embassy_nrf::buffered_uarte::{self, BufferedUarte};
|
use embassy_nrf::buffered_uarte::{self, BufferedUarte};
|
||||||
use embassy_nrf::{bind_interrupts, peripherals, uarte};
|
use embassy_nrf::{bind_interrupts, peripherals, uarte};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
bind_interrupts!(struct Irqs {
|
bind_interrupts!(struct Irqs {
|
||||||
|
@ -15,7 +15,7 @@ use embassy_nrf::{bind_interrupts, pac, peripherals, rng, usb};
|
|||||||
use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
|
use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
|
||||||
use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
|
use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
|
||||||
use embassy_usb::{Builder, Config, UsbDevice};
|
use embassy_usb::{Builder, Config, UsbDevice};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ use embassy_nrf::spim::{self, Spim};
|
|||||||
use embassy_nrf::{bind_interrupts, peripherals};
|
use embassy_nrf::{bind_interrupts, peripherals};
|
||||||
use embassy_time::Delay;
|
use embassy_time::Delay;
|
||||||
use embedded_hal_async::spi::ExclusiveDevice;
|
use embedded_hal_async::spi::ExclusiveDevice;
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, embassy_net_esp_hosted as hosted, panic_probe as _};
|
use {defmt_rtt as _, embassy_net_esp_hosted as hosted, panic_probe as _};
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ embassy-net = { version = "0.1.0", path = "../../embassy-net", features = [
|
|||||||
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = [
|
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = [
|
||||||
"defmt",
|
"defmt",
|
||||||
] }
|
] }
|
||||||
embedded-io = { version = "0.4.0", features = [ "async" ]}
|
embedded-io-async = { version = "0.5.0" }
|
||||||
|
|
||||||
defmt = "0.3"
|
defmt = "0.3"
|
||||||
defmt-rtt = "0.4"
|
defmt-rtt = "0.4"
|
||||||
|
@ -44,7 +44,7 @@ usbd-hid = "0.6.1"
|
|||||||
|
|
||||||
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
|
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
|
||||||
embedded-hal-async = "0.2.0-alpha.2"
|
embedded-hal-async = "0.2.0-alpha.2"
|
||||||
embedded-io = { version = "0.4.0", features = ["async", "defmt"] }
|
embedded-io-async = { version = "0.5.0", features = ["defmt-03"] }
|
||||||
embedded-storage = { version = "0.3" }
|
embedded-storage = { version = "0.3" }
|
||||||
static_cell = { version = "1.1", features = ["nightly"]}
|
static_cell = { version = "1.1", features = ["nightly"]}
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
@ -53,4 +53,4 @@ pio = "0.2.1"
|
|||||||
rand = { version = "0.8.5", default-features = false }
|
rand = { version = "0.8.5", default-features = false }
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = 2
|
debug = 2
|
@ -17,7 +17,7 @@ use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0};
|
|||||||
use embassy_rp::spi::{Async, Config as SpiConfig, Spi};
|
use embassy_rp::spi::{Async, Config as SpiConfig, Spi};
|
||||||
use embassy_time::{Delay, Duration};
|
use embassy_time::{Delay, Duration};
|
||||||
use embedded_hal_async::spi::ExclusiveDevice;
|
use embedded_hal_async::spi::ExclusiveDevice;
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use rand::RngCore;
|
use rand::RngCore;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
@ -19,7 +19,7 @@ use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0};
|
|||||||
use embassy_rp::spi::{Async, Config as SpiConfig, Spi};
|
use embassy_rp::spi::{Async, Config as SpiConfig, Spi};
|
||||||
use embassy_time::{Delay, Duration, Timer};
|
use embassy_time::{Delay, Duration, Timer};
|
||||||
use embedded_hal_async::spi::ExclusiveDevice;
|
use embedded_hal_async::spi::ExclusiveDevice;
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use rand::RngCore;
|
use rand::RngCore;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
@ -18,7 +18,7 @@ use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0};
|
|||||||
use embassy_rp::spi::{Async, Config as SpiConfig, Spi};
|
use embassy_rp::spi::{Async, Config as SpiConfig, Spi};
|
||||||
use embassy_time::{Delay, Duration};
|
use embassy_time::{Delay, Duration};
|
||||||
use embedded_hal_async::spi::ExclusiveDevice;
|
use embedded_hal_async::spi::ExclusiveDevice;
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use rand::RngCore;
|
use rand::RngCore;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
@ -23,7 +23,7 @@ use embassy_sync::pipe::Pipe;
|
|||||||
use embassy_usb::class::cdc_acm::{CdcAcmClass, Receiver, Sender, State};
|
use embassy_usb::class::cdc_acm::{CdcAcmClass, Receiver, Sender, State};
|
||||||
use embassy_usb::driver::EndpointError;
|
use embassy_usb::driver::EndpointError;
|
||||||
use embassy_usb::{Builder, Config};
|
use embassy_usb::{Builder, Config};
|
||||||
use embedded_io::asynch::{Read, Write};
|
use embedded_io_async::{Read, Write};
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
use crate::uart::PioUart;
|
use crate::uart::PioUart;
|
||||||
@ -240,8 +240,7 @@ mod uart_tx {
|
|||||||
use embassy_rp::gpio::Level;
|
use embassy_rp::gpio::Level;
|
||||||
use embassy_rp::peripherals::PIO0;
|
use embassy_rp::peripherals::PIO0;
|
||||||
use embassy_rp::pio::{Common, Config, Direction, FifoJoin, PioPin, ShiftDirection, StateMachine};
|
use embassy_rp::pio::{Common, Config, Direction, FifoJoin, PioPin, ShiftDirection, StateMachine};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::{ErrorType, Write};
|
||||||
use embedded_io::Io;
|
|
||||||
use fixed::traits::ToFixed;
|
use fixed::traits::ToFixed;
|
||||||
use fixed_macro::types::U56F8;
|
use fixed_macro::types::U56F8;
|
||||||
|
|
||||||
@ -293,7 +292,7 @@ mod uart_tx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Io for PioUartTx<'_> {
|
impl ErrorType for PioUartTx<'_> {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,8 +312,7 @@ mod uart_rx {
|
|||||||
use embassy_rp::gpio::Level;
|
use embassy_rp::gpio::Level;
|
||||||
use embassy_rp::peripherals::PIO0;
|
use embassy_rp::peripherals::PIO0;
|
||||||
use embassy_rp::pio::{Common, Config, Direction, FifoJoin, PioPin, ShiftDirection, StateMachine};
|
use embassy_rp::pio::{Common, Config, Direction, FifoJoin, PioPin, ShiftDirection, StateMachine};
|
||||||
use embedded_io::asynch::Read;
|
use embedded_io_async::{ErrorType, Read};
|
||||||
use embedded_io::Io;
|
|
||||||
use fixed::traits::ToFixed;
|
use fixed::traits::ToFixed;
|
||||||
use fixed_macro::types::U56F8;
|
use fixed_macro::types::U56F8;
|
||||||
|
|
||||||
@ -377,7 +375,7 @@ mod uart_rx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Io for PioUartRx<'_> {
|
impl ErrorType for PioUartRx<'_> {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ use embassy_rp::bind_interrupts;
|
|||||||
use embassy_rp::peripherals::UART0;
|
use embassy_rp::peripherals::UART0;
|
||||||
use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config};
|
use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config};
|
||||||
use embassy_time::{Duration, Timer};
|
use embassy_time::{Duration, Timer};
|
||||||
use embedded_io::asynch::{Read, Write};
|
use embedded_io_async::{Read, Write};
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ use embassy_rp::{bind_interrupts, peripherals};
|
|||||||
use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
|
use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
|
||||||
use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
|
use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
|
||||||
use embassy_usb::{Builder, Config, UsbDevice};
|
use embassy_usb::{Builder, Config, UsbDevice};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ use embassy_rp::gpio::{Level, Output};
|
|||||||
use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0};
|
use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0};
|
||||||
use embassy_rp::pio::{InterruptHandler, Pio};
|
use embassy_rp::pio::{InterruptHandler, Pio};
|
||||||
use embassy_time::Duration;
|
use embassy_time::Duration;
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ use embassy_rp::gpio::{Level, Output};
|
|||||||
use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0};
|
use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0};
|
||||||
use embassy_rp::pio::{InterruptHandler, Pio};
|
use embassy_rp::pio::{InterruptHandler, Pio};
|
||||||
use embassy_time::Duration;
|
use embassy_time::Duration;
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
|
@ -8,9 +8,10 @@ license = "MIT OR Apache-2.0"
|
|||||||
embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] }
|
embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] }
|
||||||
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] }
|
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["log", "std", "nightly"] }
|
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["log", "std", "nightly"] }
|
||||||
embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "unstable-traits", "proto-ipv6"] }
|
embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] }
|
||||||
embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" }
|
embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" }
|
||||||
embedded-io = { version = "0.4.0", features = ["async", "std", "futures"] }
|
embedded-io-async = { version = "0.5.0" }
|
||||||
|
embedded-io-adapters = { version = "0.5.0", features = ["futures-03"] }
|
||||||
critical-section = { version = "1.1", features = ["std"] }
|
critical-section = { version = "1.1", features = ["std"] }
|
||||||
|
|
||||||
async-io = "1.6.0"
|
async-io = "1.6.0"
|
||||||
|
@ -8,7 +8,7 @@ use embassy_net::tcp::TcpSocket;
|
|||||||
use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources};
|
use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources};
|
||||||
use embassy_net_tuntap::TunTapDevice;
|
use embassy_net_tuntap::TunTapDevice;
|
||||||
use embassy_time::Duration;
|
use embassy_time::Duration;
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use heapless::Vec;
|
use heapless::Vec;
|
||||||
use log::*;
|
use log::*;
|
||||||
use rand_core::{OsRng, RngCore};
|
use rand_core::{OsRng, RngCore};
|
||||||
|
@ -5,7 +5,7 @@ mod serial_port;
|
|||||||
|
|
||||||
use async_io::Async;
|
use async_io::Async;
|
||||||
use embassy_executor::Executor;
|
use embassy_executor::Executor;
|
||||||
use embedded_io::asynch::Read;
|
use embedded_io_async::Read;
|
||||||
use log::*;
|
use log::*;
|
||||||
use nix::sys::termios;
|
use nix::sys::termios;
|
||||||
use static_cell::StaticCell;
|
use static_cell::StaticCell;
|
||||||
@ -29,7 +29,7 @@ async fn run() {
|
|||||||
//
|
//
|
||||||
// This is not really needed, you could write the code below using futures::io directly.
|
// This is not really needed, you could write the code below using futures::io directly.
|
||||||
// It's useful if you want to have portable code across embedded and std.
|
// It's useful if you want to have portable code across embedded and std.
|
||||||
let mut port = embedded_io::adapters::FromFutures::new(port);
|
let mut port = embedded_io_adapters::futures_03::FromFutures::new(port);
|
||||||
|
|
||||||
info!("Serial opened!");
|
info!("Serial opened!");
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ use embassy_net::tcp::TcpSocket;
|
|||||||
use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources};
|
use embassy_net::{Config, Ipv4Address, Ipv4Cidr, Stack, StackResources};
|
||||||
use embassy_net_tuntap::TunTapDevice;
|
use embassy_net_tuntap::TunTapDevice;
|
||||||
use embassy_time::{Duration, Timer};
|
use embassy_time::{Duration, Timer};
|
||||||
use embedded_io::asynch::Write as _;
|
use embedded_io_async::Write as _;
|
||||||
use heapless::Vec;
|
use heapless::Vec;
|
||||||
use log::*;
|
use log::*;
|
||||||
use rand_core::{OsRng, RngCore};
|
use rand_core::{OsRng, RngCore};
|
||||||
|
@ -19,7 +19,8 @@ defmt-rtt = "0.4"
|
|||||||
cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] }
|
cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] }
|
||||||
cortex-m-rt = "0.7.0"
|
cortex-m-rt = "0.7.0"
|
||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
embedded-io = "0.4.0"
|
embedded-io = { version = "0.5.0" }
|
||||||
|
embedded-io-async = { version = "0.5.0" }
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.7.5", default-features = false }
|
||||||
|
@ -13,7 +13,7 @@ use embassy_stm32::rng::Rng;
|
|||||||
use embassy_stm32::time::mhz;
|
use embassy_stm32::time::mhz;
|
||||||
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
||||||
use embassy_time::{Duration, Timer};
|
use embassy_time::{Duration, Timer};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ use defmt::*;
|
|||||||
use embassy_executor::Spawner;
|
use embassy_executor::Spawner;
|
||||||
use embassy_stm32::usart::{BufferedUart, Config};
|
use embassy_stm32::usart::{BufferedUart, Config};
|
||||||
use embassy_stm32::{bind_interrupts, peripherals, usart};
|
use embassy_stm32::{bind_interrupts, peripherals, usart};
|
||||||
use embedded_io::asynch::BufRead;
|
use embedded_io_async::BufRead;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
bind_interrupts!(struct Irqs {
|
bind_interrupts!(struct Irqs {
|
||||||
|
@ -13,7 +13,7 @@ use embassy_stm32::{bind_interrupts, peripherals, usb_otg, Config};
|
|||||||
use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
|
use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
|
||||||
use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
|
use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
|
||||||
use embassy_usb::{Builder, UsbDevice};
|
use embassy_usb::{Builder, UsbDevice};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["de
|
|||||||
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
|
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||||
embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] }
|
embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] }
|
||||||
embedded-io = { version = "0.4.0", features = ["async"] }
|
embedded-io-async = { version = "0.5.0" }
|
||||||
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
|
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||||
|
|
||||||
defmt = "0.3"
|
defmt = "0.3"
|
||||||
|
@ -13,7 +13,7 @@ use embassy_stm32::rng::Rng;
|
|||||||
use embassy_stm32::time::mhz;
|
use embassy_stm32::time::mhz;
|
||||||
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
||||||
use embassy_time::{Duration, Timer};
|
use embassy_time::{Duration, Timer};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use rand_core::RngCore;
|
use rand_core::RngCore;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
@ -10,8 +10,8 @@ embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["
|
|||||||
embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
|
embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||||
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
|
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
|
||||||
embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] }
|
embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] }
|
||||||
embedded-io = { version = "0.4.0", features = ["async"] }
|
embedded-io-async = { version = "0.5.0" }
|
||||||
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
|
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||||
|
|
||||||
defmt = "0.3"
|
defmt = "0.3"
|
||||||
@ -22,7 +22,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
|
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
|
||||||
embedded-hal-async = { version = "=0.2.0-alpha.2" }
|
embedded-hal-async = { version = "=0.2.0-alpha.2" }
|
||||||
embedded-nal-async = "0.4.0"
|
embedded-nal-async = { version = "0.5.0" }
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.7.5", default-features = false }
|
||||||
|
@ -14,7 +14,7 @@ use embassy_stm32::rng::Rng;
|
|||||||
use embassy_stm32::time::Hertz;
|
use embassy_stm32::time::Hertz;
|
||||||
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
||||||
use embassy_time::{Duration, Timer};
|
use embassy_time::{Duration, Timer};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use rand_core::RngCore;
|
use rand_core::RngCore;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
@ -10,8 +10,8 @@ embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["
|
|||||||
embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
|
embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||||
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
|
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
|
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
|
||||||
embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] }
|
embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] }
|
||||||
embedded-io = { version = "0.4.0", features = ["async"] }
|
embedded-io-async = { version = "0.5.0" }
|
||||||
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
|
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||||
|
|
||||||
defmt = "0.3"
|
defmt = "0.3"
|
||||||
@ -22,7 +22,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
|
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
|
||||||
embedded-hal-async = { version = "=0.2.0-alpha.2" }
|
embedded-hal-async = { version = "=0.2.0-alpha.2" }
|
||||||
embedded-nal-async = "0.4.0"
|
embedded-nal-async = { version = "0.5.0" }
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.7.5", default-features = false }
|
||||||
|
@ -13,7 +13,7 @@ use embassy_stm32::rng::Rng;
|
|||||||
use embassy_stm32::time::mhz;
|
use embassy_stm32::time::mhz;
|
||||||
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
||||||
use embassy_time::{Duration, Timer};
|
use embassy_time::{Duration, Timer};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use rand_core::RngCore;
|
use rand_core::RngCore;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
@ -13,7 +13,7 @@ use embassy_stm32::rng::Rng;
|
|||||||
use embassy_stm32::time::mhz;
|
use embassy_stm32::time::mhz;
|
||||||
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config};
|
||||||
use embassy_time::{Duration, Timer};
|
use embassy_time::{Duration, Timer};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use embedded_nal_async::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpConnect};
|
use embedded_nal_async::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpConnect};
|
||||||
use rand_core::RngCore;
|
use rand_core::RngCore;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
|
@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
|
|||||||
[features]
|
[features]
|
||||||
default = ["nightly"]
|
default = ["nightly"]
|
||||||
nightly = ["embassy-stm32/nightly", "embassy-time/nightly", "embassy-time/unstable-traits", "embassy-executor/nightly",
|
nightly = ["embassy-stm32/nightly", "embassy-time/nightly", "embassy-time/unstable-traits", "embassy-executor/nightly",
|
||||||
"embassy-lora", "lora-phy", "lorawan-device", "lorawan", "embedded-io/async"]
|
"embassy-lora", "lora-phy", "lorawan-device", "lorawan", "dep:embedded-io-async"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# Change stm32l072cz to your chip name, if necessary.
|
# Change stm32l072cz to your chip name, if necessary.
|
||||||
@ -24,7 +24,8 @@ defmt = "0.3"
|
|||||||
defmt-rtt = "0.4"
|
defmt-rtt = "0.4"
|
||||||
|
|
||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
embedded-io = "0.4.0"
|
embedded-io = { version = "0.5.0" }
|
||||||
|
embedded-io-async = { version = "0.5.0", optional = true }
|
||||||
|
|
||||||
cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] }
|
cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] }
|
||||||
cortex-m-rt = "0.7.0"
|
cortex-m-rt = "0.7.0"
|
||||||
|
@ -6,7 +6,7 @@ use defmt::*;
|
|||||||
use embassy_executor::Spawner;
|
use embassy_executor::Spawner;
|
||||||
use embassy_stm32::usart::{BufferedUart, Config};
|
use embassy_stm32::usart::{BufferedUart, Config};
|
||||||
use embassy_stm32::{bind_interrupts, peripherals, usart};
|
use embassy_stm32::{bind_interrupts, peripherals, usart};
|
||||||
use embedded_io::asynch::{Read, Write};
|
use embedded_io_async::{Read, Write};
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
bind_interrupts!(struct Irqs {
|
bind_interrupts!(struct Irqs {
|
||||||
|
@ -25,7 +25,7 @@ embedded-hal = "0.2.6"
|
|||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.7.5", default-features = false }
|
||||||
rand_core = { version = "0.6.3", default-features = false }
|
rand_core = { version = "0.6.3", default-features = false }
|
||||||
embedded-io = { version = "0.4.0", features = ["async"] }
|
embedded-io-async = { version = "0.5.0" }
|
||||||
static_cell = { version = "1.1", features = ["nightly"]}
|
static_cell = { version = "1.1", features = ["nightly"]}
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
@ -13,7 +13,7 @@ use embassy_stm32::{bind_interrupts, peripherals, rng, usb, Config};
|
|||||||
use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
|
use embassy_usb::class::cdc_ncm::embassy_net::{Device, Runner, State as NetState};
|
||||||
use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
|
use embassy_usb::class::cdc_ncm::{CdcNcmClass, State};
|
||||||
use embassy_usb::{Builder, UsbDevice};
|
use embassy_usb::{Builder, UsbDevice};
|
||||||
use embedded_io::asynch::Write;
|
use embedded_io_async::Write;
|
||||||
use rand_core::RngCore;
|
use rand_core::RngCore;
|
||||||
use static_cell::make_static;
|
use static_cell::make_static;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
@ -12,7 +12,7 @@ embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["de
|
|||||||
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] }
|
embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] }
|
||||||
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits", "defmt-timestamp-uptime"] }
|
embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits", "defmt-timestamp-uptime"] }
|
||||||
embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] }
|
embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] }
|
||||||
embedded-io = { version = "0.4.0", features = ["async"] }
|
embedded-io-async = { version = "0.5.0" }
|
||||||
embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] }
|
embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] }
|
||||||
embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] }
|
embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] }
|
||||||
embedded-hal-async = { version = "0.2.0-alpha.2" }
|
embedded-hal-async = { version = "0.2.0-alpha.2" }
|
||||||
|
@ -26,7 +26,7 @@ embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.11" }
|
|||||||
embedded-hal-async = { version = "=0.2.0-alpha.2" }
|
embedded-hal-async = { version = "=0.2.0-alpha.2" }
|
||||||
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
|
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
embedded-io = { version = "0.4.0", features = ["async"] }
|
embedded-io-async = { version = "0.5.0" }
|
||||||
embedded-storage = { version = "0.3" }
|
embedded-storage = { version = "0.3" }
|
||||||
static_cell = { version = "1.1", features = ["nightly"]}
|
static_cell = { version = "1.1", features = ["nightly"]}
|
||||||
pio = "0.2"
|
pio = "0.2"
|
||||||
|
@ -11,7 +11,7 @@ use embassy_rp::gpio::{Level, Output};
|
|||||||
use embassy_rp::peripherals::UART0;
|
use embassy_rp::peripherals::UART0;
|
||||||
use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config, Error, Instance, Parity};
|
use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config, Error, Instance, Parity};
|
||||||
use embassy_time::{Duration, Timer};
|
use embassy_time::{Duration, Timer};
|
||||||
use embedded_io::asynch::{Read, ReadExactError, Write};
|
use embedded_io_async::{Read, ReadExactError, Write};
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
bind_interrupts!(struct Irqs {
|
bind_interrupts!(struct Irqs {
|
||||||
|
@ -9,7 +9,7 @@ use embassy_executor::Spawner;
|
|||||||
use embassy_rp::bind_interrupts;
|
use embassy_rp::bind_interrupts;
|
||||||
use embassy_rp::peripherals::UART0;
|
use embassy_rp::peripherals::UART0;
|
||||||
use embassy_rp::uart::{BufferedInterruptHandler, Config, Uart};
|
use embassy_rp::uart::{BufferedInterruptHandler, Config, Uart};
|
||||||
use embedded_io::asynch::{Read, Write};
|
use embedded_io_async::{Read, Write};
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
bind_interrupts!(struct Irqs {
|
bind_interrupts!(struct Irqs {
|
||||||
|
Loading…
Reference in New Issue
Block a user