From 7230e3880775dd0f6e197a464fda37d7516547a4 Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Wed, 29 Nov 2023 08:20:38 -0800 Subject: [PATCH] embedded-hal: 1.0.0-rc.1 -> 1.0.0-rc.2 --- CHANGELOG.md | 8 +++++++- Cargo.toml | 6 +++--- README.md | 2 +- src/delay.rs | 6 +++++- src/lib.rs | 2 +- src/spi.rs | 4 ++-- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7bb32b..20b5fe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ 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). +## [0.19.0] - 2023-11-29 +### Changed +- Updated the v1 release of `embedded-hal` from `1.0.0-rc.1` to `1.0.0-rc.2`. +- Updated the v1 release of `embedded-hal-nb` from `1.0.0-rc.1` to `1.0.0-rc.2`. + ## [0.18.0] - 2023-10-30 ### Added - Added an I2C implementation for `embedded-hal` version 1. @@ -158,7 +163,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.1.0] - 2020-09-12 - Initial release -[Unreleased]: https://github.com/ftdi-rs/ftdi-embedded-hal/compare/v0.18.0...HEAD +[Unreleased]: https://github.com/ftdi-rs/ftdi-embedded-hal/compare/v0.19.0...HEAD +[0.19.0]: https://github.com/ftdi-rs/ftdi-embedded-hal/compare/v0.18.0...v0.19.0 [0.18.0]: https://github.com/ftdi-rs/ftdi-embedded-hal/compare/v0.17.0...v0.18.0 [0.17.0]: https://github.com/ftdi-rs/ftdi-embedded-hal/compare/v0.16.0...v0.17.0 [0.16.0]: https://github.com/ftdi-rs/ftdi-embedded-hal/compare/v0.15.1...v0.16.0 diff --git a/Cargo.toml b/Cargo.toml index 36c5de5..bf4ff3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ftdi-embedded-hal" -version = "0.18.0" +version = "0.19.0" authors = ["Alex Martens "] description = "embedded-hal implementation for FTDI USB devices." keywords = ["ftdi", "usb", "io", "hal"] @@ -17,8 +17,8 @@ default = [] [dependencies] eh0 = { package = "embedded-hal", version = "0.2.7", features = ["unproven"] } -eh1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } -ehnb1 = { package = "embedded-hal-nb", version = "=1.0.0-rc.1" } +eh1 = { package = "embedded-hal", version = "=1.0.0-rc.2" } +ehnb1 = { package = "embedded-hal-nb", version = "=1.0.0-rc.2" } ftdi = { version = "0.1.3", optional = true } ftdi-mpsse = "0.1" libftd2xx = { version = "0.32", optional = true } diff --git a/README.md b/README.md index fcb4a83..a55200c 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ FTDI device into the [embedded-hal] traits. ```toml [dependencies.ftdi-embedded-hal] -version = "0.18.0" +version = "0.19.0" features = ["libftd2xx", "libftd2xx-static"] ``` diff --git a/src/delay.rs b/src/delay.rs index b159ae8..d312073 100644 --- a/src/delay.rs +++ b/src/delay.rs @@ -32,7 +32,11 @@ impl Default for Delay { } } -impl eh1::delay::DelayUs for Delay { +impl eh1::delay::DelayNs for Delay { + fn delay_ns(&mut self, ns: u32) { + std::thread::sleep(std::time::Duration::from_nanos(ns.into())) + } + fn delay_us(&mut self, us: u32) { std::thread::sleep(std::time::Duration::from_micros(us.into())) } diff --git a/src/lib.rs b/src/lib.rs index a3cae7d..38c33ba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ //! //! ```toml //! [dependencies.ftdi-embedded-hal] -//! version = "0.18.0" +//! version = "0.19.0" //! features = ["libftd2xx", "libftd2xx-static"] //! ``` //! diff --git a/src/spi.rs b/src/spi.rs index d90b7db..4a6a035 100644 --- a/src/spi.rs +++ b/src/spi.rs @@ -526,8 +526,8 @@ where eh1::spi::Operation::TransferInPlace(buffer) => { eh1::spi::SpiBus::transfer_in_place(&mut bus, buffer)?; } - eh1::spi::Operation::DelayUs(micros) => { - std::thread::sleep(std::time::Duration::from_micros((*micros).into())); + eh1::spi::Operation::DelayNs(micros) => { + std::thread::sleep(std::time::Duration::from_nanos((*micros).into())); } } }