PackageTrack
Sign in Get early access

embedded-hal

A Hardware Abstraction Layer (HAL) for embedded systems

1.0.0 31M downloads/mo #1649 most downloaded on crates.io rust-embedded/embedded-hal

What this package is like to depend on

Last release 3 years ago

no release in 18 months

Ships fairly regularly

a new release about every 2 months

Most releases are documented

notes for 9 of 13 stable releases

Nothing withdrawn

no release was ever pulled

9 years old

28 releases · first in 2018

0 releases in the last 12 months

see the full history below

Release timeline

28 releases · Jan 2018 to Jan 2024
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 28
  1. 1.0.0 09 Jan 2024
    Release notes

    Check out the announcement blog post and the migration guide.

    Changes since v1.0.0-rc.3:

    • gpio: remove ToggleableOutputPin, move toggle() to StatefulOutputPin.
    Open source →
    Release notes

    Check out the announcement blog post and the migration guide for help with migrating from v0.2 to v1.0.

    • gpio: remove ToggleableOutputPin, move toggle() to StatefulOutputPin.
    Open source →
  2. 1.0.0-rc.3 14 Dec 2023 pre-release
    Release notes
    • gpio: require &mut self in InputPin and StatefulOutputPin.
    Open source →
  3. 1.0.0-rc.2 29 Nov 2023 pre-release
    Release notes
    • Minor document fixes.
    • Add #[inline] hints to most of embedded-hal functions.
    • pwm: rename get_max_duty_cycle to max_duty_cycle.
    • delay: Rename DelayUs to DelayNs
    • delay: Add DelayNs::delay_ns()
    • delay: Add default impls of delay_ms and delay_us based on delay_ns.
    • delay: Make the default impl of delay_ms more efficient, it now does less calls to the underlying delay_ns (previously delay_us).
    • spi: Rename Operation::DelayUs to Operation::DelayNs, with nanosecond precision.
    Open source →
  4. 1.0.0-rc.1 15 Aug 2023 pre-release
    Release notes
    • The Minimum Supported Rust Version (MSRV) is now 1.60.0
    • Add optional defmt 0.3 support.
    • Remove serial traits, the replacement is the embedded-io crate.
    • Added + ?Sized to all blanket impls.
    Open source →
  5. 1.0.0-alpha.11 04 Jul 2023 pre-release
    Release notes

    *** This is (also) an alpha release with breaking changes (sorry) ***

    Added

    • spi: added Operation::DelayUs(u32).

    Removed

    • spi: removed read-only and write-only traits.
    Open source →
  6. 1.0.0-alpha.10 05 Apr 2023 pre-release
    Release notes

    *** This is (also) an alpha release with breaking changes (sorry) ***

    Added

    • Added pwm::SetDutyCycle trait.

    Changed

    • gpio: add ErrorKind enum for consistency with other traits and for future extensibility. No kinds are defined for now.
    • delay: make infallible.
    • i2c: remove _iter() methods.
    • i2c: add default implementations for all methods based on transaction().
    • i2c: document guidelines for shared bus usage.
    • spi: SpiDevice transaction now takes an operation slice instead of a closure
    Open source →
  7. 1.0.0-alpha.9 28 Sep 2022 pre-release
    Release notes

    *** This is (also) an alpha release with breaking changes (sorry) ***

    Changed

    • The embedded-hal crate now contains blocking traits only. Import paths no longer contain ::blocking.

    Added

    • Implement PartialOrd, Ord, Hash for can::StandardId, can::ExtendedId and can::Id according to CAN bus arbitration rules
    • Implement Eq for i2c::Operation
    • Implement PartialOrd, Ord, Hash for can::StandardId, can::ExtendedId and can::Id according to CAN bus arbitration rules.

    Fixed

    • Fixed documentation for wait_for_rising_edge.

    Removed

    • digital::blocking::IoPin traits. See: #340, #397.
    • nb traits are now available in a separate embedded-hal-nb crate.
    • spi::blocking::ExclusiveDevice and spi::blocking::ExclusiveDeviceError. These have been moved to a separate embedded-hal-bus crate.
    • Moved CAN traits to a separate embedded-can crate.
    Open source →
  8. 1.0.0-alpha.8 15 Apr 2022 pre-release
    Release notes

    *** This is (also) an alpha release with breaking changes (sorry) ***

    Changed

    • The Minimum Supported Rust Version (MSRV) is now 1.59.0
    • spi: unify all traits into SpiReadBus, SpiWriteBus and SpiBus (read-write).
    • spi: Add SpiDevice trait to represent a single device in a (possibly shared) bus, with managed chip-select (CS) pin.
    • spi: Clarify that implementations are allowed to return before operations are finished, add flush to wait until finished.

    Removed

    • ADC traits: adc::nb::OneShot and adc::nb::Channel.
    Open source →
  9. 1.0.0-alpha.7 10 Feb 2022 pre-release
    Release notes

    *** This is (also) an alpha release with breaking changes (sorry) ***

    Added

    • Error traits for CAN, SPI, I2C and Serial are implemented for Infallible.

    Fixed

    • Fixed blanket impl of DelayUs not covering the delay_ms method.

    Changed

    • spi: traits now enforce all impls on the same struct (e.g. Transfer and Write) have the same Error type.
    • digital: traits now enforce all impls on the same struct have the same Error type.
    • serial: traits now enforce all impls on the same struct have the same Error type.
    • i2c: traits now enforce all impls on the same struct have the same Error type.
    • i2c: unify all traits into a single I2c trait.

    Removed

    • Traits with unconstrained associated types and their modules (See: #324, #354):
      • capture::Capture
      • pwm::Pwm
      • pwm::PwmPin
      • qei::Qei
      • timer::Cancel
      • timer::CountDown
      • timer::Periodic
      • watchdog::Disable
      • watchdog::Enable
      • watchdog::Watchdog
    Open source →
  10. 1.0.0-alpha.6 19 Nov 2021 pre-release
    Release notes

    *** This is (also) an alpha release with breaking changes (sorry) ***

    Changed

    • Use u8 as default SPI as Serial Word type
    • The Minimum Supported Rust Version (MSRV) is now 1.46.0
    • Require all SPI and Serial word types to be Copy.

    Added

    • Added Can Controller Area Network traits.
    • Error traits for SPI, I2C and Serial traits. The error types used in those must implement these Error traits, which implies providing a conversion to a common set of error kinds. Generic drivers using these interfaces can then convert the errors to this common set to act upon them.

    Removed

    • Removed DelayMs in favor of DelayUs with u32 as type for clarity.
    Open source →
  11. 1.0.0-alpha.5 11 Sep 2021 pre-release
    Release notes

    *** This is (also) an alpha release with breaking changes (sorry) ***

    Added

    • Added IoPin trait for pins that can change between being inputs or outputs dynamically.
    • Added Debug to all spi mode types.
    • Add impls of all traits for references (&T or &mut T depending on the trait) when T implements the trait.
    • SPI: Added blocking Read trait and Read transactional operation
    • SPI: Added blocking Transfer trait with separate buffers (single-buffer Transfer has been renamed TransferInplace)

    Changed

    • Swap PWM channel arguments to references
    • All trait methods have been renamed to remove the try_ prefix (i.e. try_send -> send) for consistency.
    • Moved all traits into two submodules for each feature depending on the execution model: blocking and nb (non-blocking). For example, the spi traits can now be found under embedded_hal::spi::blocking or embedded_hal::spi::nb.
    • Execution-model-independent definitions have been moved into the feature module. For example, SPI Phase is now defined in embedded_hal::spi::Phase. For convenience, these definitions are reexported in both of its blocking and non-blocking submodules.
    • Re-export nb::{block!, Error, Result} to avoid version mismatches. These should be used instead of importing the nb crate directly in dependent crates.
    • blocking::Serial: renamed bwrite_all to write, bflush to `flush.
    • Removed prelude to avoid method name conflicts between different flavors (blocking, nb) of the same trait. Traits must now be manually imported.
    • Removed the various Default marker traits.
    • Removed &[W] returned slice in spi::blocking::Transfer.
    • Require all associated error types to implement core::fmt::Debug.

    Removed

    • Removed random number generation (rng) traits in favor of rand_core.
    Open source →
  12. 1.0.0-alpha.4 12 Nov 2020 pre-release
    Release notes

    Fixed

    • Support for I2C addressing modes in Transactional I2C traits.
    Open source →
  13. 1.0.0-alpha.3 04 Nov 2020 pre-release
    Release notes

    Added

    • Transactional SPI interface for executing groups of SPI transactions.
    • Transactional I2C interface for executing groups of I2C transactions.
    Open source →
  14. 1.0.0-alpha.2 15 Oct 2020 pre-release
    Release notes

    *** This is (also) an alpha release with breaking changes (sorry) ***

    Added

    • 10-bit addressing mode for I2C traits.
    • try_set_state method for OutputPin using an input PinState value.

    Changed

    • I2C addressing modes are now selected via an AddressMode type parameter. The trait features implementations for marker types SevenBitAddress and TenBitAddress. SevenBitAddress is the default mode so this is not a breaking change.
    • The method try_write from the trait blocking::i2c::WriteIter trait has been renamed try_write_iter for consistency.
    • Updated nb dependency to version 1.
    • The watchdog API now uses move semantics. See PR.
    • The ADC Channel trait now uses a stateful method to get the IDs.
    Open source →
  15. 1.0.0-alpha.1 16 Jun 2020 pre-release
    Release notes

    *** This is an alpha release with breaking changes (sorry) ***

    Added

    • A nonblocking trait for interfacing with random number generation hardware.

    Changed

    • All traits have been marked as proven (unproven feature has been removed).
    • All trait methods have been made fallible.
    • All trait methods have been renamed try_* (i.e. try_send) for consistency.
    • The Capture, Pwm, PwmPin and Qei traits have been moved into their own capture, pwm and qei modules for consistency.
    • Void has been replaced with core::convert::Infallible which should be used in trait implementations where methods cannot fail.
    • A new process has been adopted for the addition of traits to the embedded-hal.
    • The ADC Channel trait now uses a constant to represent the IDs.
    • The minimum supported Rust version is 1.35 due to this issue.
    Open source →
  16. 0.2.7 09 Feb 2022

    Nothing published for this version

  17. 0.2.6 04 Aug 2021

    Nothing published for this version

  18. 0.2.5 28 Apr 2021

    Nothing published for this version

  19. 0.2.4 17 Jun 2020

    Nothing published for this version

  20. 0.2.3 09 May 2019
    Release notes

    Added

    • A new version of the digital OutputPin, StatefulOutputPin, ToggleableOutputPin and InputPin traits has been added under digital::v2. These traits are now fallible and their methods now return a Result type as setting an output pin and reading an input pin could potentially fail. See here for more info.
    • Compatibility shims between digital::v1 and digital::v2 traits allowing v1 traits to be implicitly promoted to v2, and for v2 traits to be explicitly cast to v1 wrappers.

    Changed

    • The current versions of the OutputPin, StatefulOutputPin, ToggleableOutputPin and InputPin traits have been marked as deprecated. Please use the new versions included in digital::v2. See here for more info.
    Open source →
  21. 0.2.3-rc.1 10 Apr 2019 pre-release

    Nothing published for this version

  22. 0.2.2 03 Nov 2018
    Release notes

    Added

    • Added the Rust Code of Conduct to this repository
    • The first ADC-related trait. This is a simple trait for one-shot conversions.
    • Iterator-based blocking write and write+read traits have been added to I2C and SPI.
    • New helper constants for SPI modes.
    • A new trait for a cancellable countdown.
    • New traits for watchdog timer management, including startup, feeding, and stopping.

    Changed

    • Updated docs to clarify I2C address bit widths and expectations.
    Open source →
  23. 0.2.1 14 May 2018
    Release notes

    Changed

    • Auto-generated documentation (docs.rs) now includes the unproven traits.
    Open source →
  24. 0.2.0 12 May 2018
    Release notes

    Added

    • A ToggeableOutputPin trait has been added. This trait contains a single method: toggle that can be used to toggle the state of a push-pull pin.

    Changed

    • [breaking-change] The signature of CountDown.wait changed; it now returns nb::Result<(), Void>. Where Void is the stable alternative to the never type, !, provided by the stable void crate. Implementations of the CountDown trait will have to be updated to use the new signature. With this change this crate compiles on the stable and beta channels.
    • [breaking-change] the OutputPin.is_{low,high} methods have been moved into its own trait StatefulOutputPin and renamed to is_set_{low,high}.

    • It has been clarified in the documentation that OutputPin must be implemented for push-pull output pins (and e.g. not for open drain output pins).

    Open source →
  25. 0.1.3 14 May 2018
    Release notes

    Changed

    • Re-export most / unchanged traits from embedded-hal v0.2.x to allow interoperation between HAL implementations and drivers that are using different minor versions.
    Open source →
  26. 0.1.2 13 Feb 2018
    Release notes

    Added

    • Unproven blocking::serial::* traits
    Open source →
  27. 0.1.1 06 Feb 2018
    Release notes

    Added

    • Unproven digital::InputPin trait
    Open source →
  28. 0.1.0 16 Jan 2018
    Release notes

    Initial release

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive