A compatibility layer to smooth the transition between different versions of embedded-hal

Overview

Embedded HAL Compatibility Layer

A compatibility layer to smooth the transition between different versions of embedded-hal (specifically 0.2.x and 1.0.0-alpha.X series).

This resolves the problem where a HAL implementation (ie. the implementation for your processor) and driver you intend to use are mismatched.

This crate is intended to track 1.0.0-alpha versions, and update to 1.0.0 on release, adaptation is not provided between 1.0.0-alpha.x releases (though we could do this if it was deemed worthwhile)

Supported Versions

Each release of embedded-hal-compat supports one(ish) pair of e-h releases, because of changes to the 1.0.0-alpha, use:

  • embedded-hal-compat = "0.5.0" for =1.0.0-alpha.6 and ^0.2.4
  • embedded-hal-compat = "0.4.0" for =1.0.0-alpha.5 and ^0.2.4
  • embedded-hal-compat = "0.3.0" for =1.0.0-alpha.4 and ^0.2.4

Status

GitHub tag Build Status Crates.io Docs.rs

Not all wrappers are fully implemented, feel free to open a PR if you come across something missing!

How to use this:

  • Add embedded-hal-compat to your dependencies
  • Import with use embedded_hal_compat::{ForwardCompat, ReverseCompat};
  • Vicariously add .forward() or .reverse() on any embedded-hal type mismatches
  • See docs.rs for further documentation

How do I know that I need this?

Type errors. Lots of type errors.

(and cargo tree -i embedded-hal returns two versions)

Is this cursed?!

At least a little bit, because traits have the same method names you might end up with some cursed errors, and we have to pave over some differences around errors and error kinds...

What kind of errors?

Because you're likely to have symbols with the same name you'll end up with errors like:

error[E0599]: no method named `delay_ms` found for mutable reference `&mut Compat
   
    ` in the current scope
   --> src/main.rs:351:27
    |
351 |         tlv.inner_delay().delay_ms(10u32);
    |                           ^^^^^^^^ method not found in `&mut Compat
    
     `

warning: unused import: `embedded_hal::blocking::delay::DelayMs`
  --> src/main.rs:22:5
   |
22 | use embedded_hal::blocking::delay::DelayMs;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    
   

Suggesting you're missing an import that's obviously there, because you have the 0.2.x imports not the 1.0.0-alpha.x imports, and the method is called try_delay_ms in the updated HAL (a fairly common renaming).

You can fix this by importing the correct trait with something like: use embedded_hal_compat::eh1_0::blocking::delay::{DelayMs as _}; (this must be renamed with as / you can't use the prelude because the names overlap), and by swapping the method to use the correct try_ name.

Comments
  • usage question

    usage question

    I am trying to use embedded-hal-compat with a fork of rust-radio-sx127x in which I have put some examples. I am testing with stm32f1xx_hal. In Cargo.toml I have added

    [dependencies]
    #embedded-hal-compat = "0.1.2"
    embedded-hal-compat = { git = "https://github.com/ryankurte/embedded-hal-compat.git", branch = "main"}
    

    In the example code I have added

    • in the prelude
    use embedded_hal_compat::IntoCompat;
    use embedded_hal_compat::eh1_0::blocking::delay::{DelayMs as _};
    
    • in the setup() function
           let delay = Delay::new(cp.SYST, clocks);
           // Create lora radio instance 
           let lora = Sx127x::spi(
        	    spi.compat(),					             //Spi
        	    gpioa.pa1.into_push_pull_output(&mut gpioa.crl),         //CsPin         on PA1
        	    gpiob.pb8.into_floating_input(&mut gpiob.crh),           //BusyPin  DIO0 on PB8
                gpiob.pb9.into_floating_input(&mut gpiob.crh),           //ReadyPin DIO1 on PB9
        	    gpioa.pa0.into_push_pull_output(&mut gpioa.crl),         //ResetPin      on PA0
        	    delay.compat(),					             //Delay
        	    &CONFIG_RADIO,					     //&Config
        	    ).unwrap();      // should handle error
    
           lora
           }
    
    • and in main()
    #[entry]
    fn main() -> !{
        let mut lora =  setup();  //delay is available in lora
    ...
          lora.try_delay_ms(5000u32);
    

    but I am still getting trait bound problems with InputPin and OutputPin (as in #1) and some other problems:

    Click to expand
    
    $ cargo build  --no-default-features  --target $TARGET --features=$HAL,$MCU  --example lora_spi_send
    warning: Patch `radio v0.8.1 (https://github.com/ryankurte/rust-radio.git?branch=master#b2383d55)` was not used in the crate graph.
    Check that the patched package version and available features are compatible
    with the dependency requirements. If the patch has a different version from
    what is locked in the Cargo.lock file, run `cargo update` to use the new
    version. This may also occur with an optional dependency that is not enabled.
       Compiling semver-parser v0.7.0
       Compiling nb v1.0.0
       Compiling typenum v1.12.0
       Compiling proc-macro2 v1.0.24
       Compiling void v1.0.2
       Compiling unicode-xid v0.2.1
       Compiling version_check v0.9.2
       Compiling cortex-m v0.7.1
       Compiling syn v1.0.61
       Compiling vcell v0.1.3
       Compiling stable_deref_trait v1.2.0
       Compiling bitfield v0.13.2
       Compiling log v0.4.14
       Compiling cfg-if v1.0.0
       Compiling cortex-m-rt v0.6.13
       Compiling cortex-m v0.6.7
       Compiling async-trait v0.1.45
       Compiling stm32f1 v0.11.0
       Compiling r0 v0.2.2
       Compiling libc v0.2.87
       Compiling cortex-m-semihosting v0.3.7
       Compiling bitflags v1.2.1
       Compiling byteorder v1.4.2
       Compiling radio-sx127x v0.10.1 (/home/paul/githubClones/rust-radio-sx127x)
       Compiling heapless v0.6.1
       Compiling panic-halt v0.2.0
       Compiling nb v0.1.3
       Compiling embedded-hal v1.0.0-alpha.4
       Compiling volatile-register v0.2.0
       Compiling semver v0.9.0
       Compiling embedded-dma v0.1.2
       Compiling generic-array v0.14.4
       Compiling embedded-hal v0.2.4
       Compiling hash32 v0.1.1
       Compiling rustc_version v0.2.3
       Compiling embedded-hal-compat v0.1.2 (https://github.com/ryankurte/embedded-hal-compat.git?branch=main#4e6f7e3b)
       Compiling driver-pal v0.8.0-alpha.2
       Compiling embedded-spi v0.6.2
       Compiling bare-metal v0.2.5
       Compiling cast v0.2.3
       Compiling quote v1.0.9
       Compiling generic-array v0.12.4
       Compiling generic-array v0.13.3
       Compiling panic-semihosting v0.5.6
       Compiling as-slice v0.1.5
       Compiling aligned v0.3.4
       Compiling cortex-m-rt-macros v0.1.8
       Compiling radio v0.7.0
       Compiling stm32f1xx-hal v0.7.0
    error[E0107]: wrong number of type arguments: expected 3, found 2
       --> examples/lora_spi_send.rs:196:55
        |
    196 |     fn setup() ->  impl DelayMs<u32> + Transmit<Error=sx127xError<Error, core::convert::Infallible>> {
        |                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 type arguments
    
    error[E0308]: mismatched types
       --> examples/lora_spi_send.rs:220:12
        |
    220 |            MODE,
        |            ^^^^ expected struct `stm32f1xx_hal::spi::Mode`, found struct `embedded_hal::spi::Mode`
        |
        = note: perhaps two different versions of crate `embedded_hal` are being used?
    
    error[E0277]: the trait bound `Compat<Spi<stm32f1xx_hal::pac::SPI1, Spi1NoRemap, (PA5<Alternate<PushPull>>, PA6<Input<Floating>>, PA7<Alternate<PushPull>>), u8>>: embedded_hal::blocking::spi::transactional::Default<u8>` is not satisfied
       --> examples/lora_spi_send.rs:231:19
        |
    231 |        let lora = Sx127x::spi(
        |                   ^^^^^^^^^^^ the trait `embedded_hal::blocking::spi::transactional::Default<u8>` is not implemented for `Compat<Spi<stm32f1xx_hal::pac::SPI1, Spi1NoRemap, (PA5<Alternate<PushPull>>, PA6<Input<Floating>>, PA7<Alternate<PushPull>>), u8>>`
        |
        = note: required because of the requirements on the impl of `embedded_hal::blocking::spi::Transactional<u8>` for `Compat<Spi<stm32f1xx_hal::pac::SPI1, Spi1NoRemap, (PA5<Alternate<PushPull>>, PA6<Input<Floating>>, PA7<Alternate<PushPull>>), u8>>`
        = note: required by `radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi`
    
    error[E0277]: the trait bound `PA1<Output<PushPull>>: embedded_hal::digital::OutputPin` is not satisfied
       --> examples/lora_spi_send.rs:231:19
        |
    231 |        let lora = Sx127x::spi(
        |                   ^^^^^^^^^^^ the trait `embedded_hal::digital::OutputPin` is not implemented for `PA1<Output<PushPull>>`
        |
        = note: required by `radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi`
    
    error[E0277]: the trait bound `PB8<Input<Floating>>: embedded_hal::digital::InputPin` is not satisfied
       --> examples/lora_spi_send.rs:231:19
        |
    231 |        let lora = Sx127x::spi(
        |                   ^^^^^^^^^^^ the trait `embedded_hal::digital::InputPin` is not implemented for `PB8<Input<Floating>>`
        |
        = note: required by `radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi`
    
    error[E0277]: the trait bound `PB9<Input<Floating>>: embedded_hal::digital::InputPin` is not satisfied
       --> examples/lora_spi_send.rs:231:19
        |
    231 |        let lora = Sx127x::spi(
        |                   ^^^^^^^^^^^ the trait `embedded_hal::digital::InputPin` is not implemented for `PB9<Input<Floating>>`
        |
        = note: required by `radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi`
    
    error[E0277]: the trait bound `PA0<Output<PushPull>>: embedded_hal::digital::OutputPin` is not satisfied
       --> examples/lora_spi_send.rs:231:19
        |
    231 |        let lora = Sx127x::spi(
        |                   ^^^^^^^^^^^ the trait `embedded_hal::digital::OutputPin` is not implemented for `PA0<Output<PushPull>>`
        |
        = note: required by `radio_sx127x::Sx127x::<driver_pal::wrapper::Wrapper<Spi, SpiError, CsPin, BusyPin, ReadyPin, ResetPin, PinError, Delay, DelayError>, SpiError, PinError, DelayError>::spi`
    
    warning: unused import: `DelayMs`
      --> examples/lora_spi_send.rs:71:51
       |
    71 | use embedded_hal_compat::eh1_0::blocking::delay::{DelayMs as _};
       |                                                   ^^^^^^^
       |
       = note: `#[warn(unused_imports)]` on by default
    
    error: aborting due to 7 previous errors; 1 warning emitted
    
    Some errors have detailed explanations: E0107, E0277, E0308.
    For more information about an error, try `rustc --explain E0107`.
    error: could not compile `radio-sx127x`
    
    I thought the `OutputPin` was fixed in the last PR merge so I suppose I am doing something wrong? A more complete subset of the code is:
    Click to expand
    
    #![no_std]
    #![no_main]
    
    use embedded_hal_compat::IntoCompat;
    use embedded_hal_compat::eh1_0::blocking::delay::{DelayMs as _};
    
    #[cfg(debug_assertions)]
    extern crate panic_semihosting;
    
    #[cfg(not(debug_assertions))]
    extern crate panic_halt;
    
    // use nb::block;
    use cortex_m_rt::entry;
    use cortex_m_semihosting::*;
    
    use embedded_hal::{blocking::delay::DelayMs,
                       spi::{Mode, Phase, Polarity},
    		   };
    
    //use asm_delay::{ AsmDelay, bitrate, };
    
    //use cortex_m::asm;  //for breakpoint
    
    use radio_sx127x::Error as sx127xError;                           // Error name conflict with hals
    use radio_sx127x::{prelude::*,                                    // prelude has Sx127x,
    		   device::{Modem, Channel, PaConfig, PaSelect,},
                       device::lora::{LoRaConfig, LoRaChannel, Bandwidth, SpreadingFactor, CodingRate,
                                      PayloadLength, PayloadCrc, FrequencyHopping, },
    		   };
    
    //use radio::{Receive, Transmit}; 
    use radio::{Transmit}; // trait needs to be in scope to find  methods start_transmit and check_transmit.
    
    
    // lora and radio parameters
    
    pub const MODE: Mode = Mode {		    //  SPI mode for radio
        phase: Phase::CaptureOnSecondTransition,
        polarity: Polarity::IdleHigh,
        };
    
    const FREQUENCY: u32 = 907_400_000;     // frequency in hertz ch_12: 915_000_000, ch_2: 907_400_000
    
    const CONFIG_CH: LoRaChannel = LoRaChannel {
    	    freq: FREQUENCY as u32,	       // frequency in hertz
    	    bw:   Bandwidth::Bw125kHz,
    	    sf:   SpreadingFactor::Sf7,
    	    cr:   CodingRate::Cr4_8,	      
    	    };
    
    const CONFIG_LORA: LoRaConfig = LoRaConfig {
        preamble_len:   0x8,
        symbol_timeout: 0x64,
        payload_len:    PayloadLength::Variable,
        payload_crc:    PayloadCrc::Enabled,
        frequency_hop:  FrequencyHopping::Disabled,
        invert_iq:      false,
        };
    
    const CONFIG_PA: PaConfig = PaConfig {output: PaSelect::Boost, 
                                           power: 10, };
    
    //let CONFIG_RADIO = Config::default() ;
    
    const CONFIG_RADIO: radio_sx127x::device::Config = radio_sx127x::device::Config {
    	modem:      Modem::LoRa(CONFIG_LORA),
    	channel:    Channel::LoRa(CONFIG_CH),
    	pa_config:  CONFIG_PA,
    	xtal_freq:  32000000,                  // CHECK
    	timeout_ms: 100,
    	};
    
    
    // setup() does all  hal/MCU specific setup and returns generic object for use in main code.
    
    #[cfg(feature = "stm32f1xx")]  //  eg blue pill stm32f103
    use stm32f1xx_hal::{prelude::*,   
                        pac::Peripherals, 
                        spi::{Spi,  Error,},
                        delay::Delay,
                        }; 
    
        #[cfg(feature = "stm32f1xx")]
        fn setup() ->  impl DelayMs<u32> + Transmit<Error=sx127xError<Error, core::convert::Infallible>> {
    
        //fn setup() ->  Sx127x<Wrapper<Spi<SPI1, Spi1NoRemap,
        //                    (PA5<Alternate<PushPull>>,  PA6<Input<Floating>>, PA7<Alternate<PushPull>>), u8>, Error, 
        //               PA1<Output<PushPull>>,  PB8<Input<Floating>>,  PB9<Input<Floating>>,  PA0<Output<PushPull>>, 
        //               core::convert::Infallible,  Delay>, Error, core::convert::Infallible> {
    
           let cp = cortex_m::Peripherals::take().unwrap();
           let p  = Peripherals::take().unwrap();
    
           let mut rcc   = p.RCC.constrain();
           let clocks = rcc.cfgr.sysclk(64.mhz()).pclk1(32.mhz()).freeze(&mut p.FLASH.constrain().acr);
           
           let mut afio = p.AFIO.constrain(&mut rcc.apb2);
           let mut gpioa = p.GPIOA.split(&mut rcc.apb2);
           let mut gpiob = p.GPIOB.split(&mut rcc.apb2);
        
           let spi = Spi::spi1(
               p.SPI1,
               (gpioa.pa5.into_alternate_push_pull(&mut gpioa.crl),  //   sck   on PA5
                gpioa.pa6.into_floating_input(&mut gpioa.crl),       //   miso  on PA6
                gpioa.pa7.into_alternate_push_pull(&mut gpioa.crl)   //   mosi  on PA7
                ),
                   &mut afio.mapr,
               MODE,
               8.mhz(),
               clocks, 
               &mut rcc.apb2,
               );
    
         
           let delay = Delay::new(cp.SYST, clocks);
    
           // Create lora radio instance 
    
           let lora = Sx127x::spi(
        	    spi.compat(),					             //Spi
        	    gpioa.pa1.into_push_pull_output(&mut gpioa.crl),         //CsPin         on PA1
        	    gpiob.pb8.into_floating_input(&mut gpiob.crh),           //BusyPin  DIO0 on PB8
                gpiob.pb9.into_floating_input(&mut gpiob.crh),           //ReadyPin DIO1 on PB9
        	    gpioa.pa0.into_push_pull_output(&mut gpioa.crl),         //ResetPin      on PA0
        	    delay.compat(),					             //Delay
        	    &CONFIG_RADIO,					     //&Config
        	    ).unwrap();      // should handle error
    
           lora
           }
    
    // End of hal/MCU specific setup. Following should be generic code.
    
    #[entry]
    fn main() -> !{
    
        let mut lora =  setup();  //delay is available in lora
    
        let message = b"Hello, LoRa!";
    
        loop {
           lora.start_transmit(message).unwrap();    // should handle error
           
           match lora.check_transmit() {
               Ok(b) => if b {hprintln!("TX complete").unwrap()} 
                        else {hprintln!("TX not complete").unwrap()},
               
               Err(_err) => hprintln!("Error in lora.check_transmit(). Should return True or False.").unwrap(),
               };
           
           lora.try_delay_ms(5000u32); 
           };
    }
    
    

    Output from the workflow is at https://github.com/pdgilbert/rust-radio-sx127x/runs/2041700780?check_suite_focus=true

    opened by pdgilbert 8
  • Add missing TransferInPlace for 0.6.1

    Add missing TransferInPlace for 0.6.1

    Hello, I needed a library that required this trait to be implemented So here it is, It is tiny and mostly a copy of the Transfer trait implementation.

    opened by fenax 4
  • wip: Add 1.0.0-alpha.8 -> 0.2.7 compat layer

    wip: Add 1.0.0-alpha.8 -> 0.2.7 compat layer

    Closes ryankurte/embedded-hal-compat#9

    TODO:

    • [x] Update to new traits
    • [x] Get new compat layer building
    • [x] Implement new compat layer
    • [ ] Update docs/tests and ensure passing/building
    opened by silvergasp 4
  • WIP: update to e-h 1.0.0-alpha.6

    WIP: update to e-h 1.0.0-alpha.6

    ~~changes to SPI (https://github.com/rust-embedded/embedded-hal/pull/287) mean forward compat for spi::Transfer and spi::Exec is no longer possible :-/~~

    ~~if we want to continue providing compatibility the easiest is probably to backport a transfer_split(write: &[u8], read: &[u8]) to 0.2.x.~~

    cc. @eldruin @dirbaio

    [edit] solved below, thanks folks!

    opened by ryankurte 2
  • How to add Transactional trait

    How to add Transactional trait

    I'm attempting to get the rust-radio-sx128x crate working with the nrf-hal. That hal hasn't yet implemented the v1.0.0-alpha.N embedded-hal traits.

    So far compat() has solved all the trait errors except for blocking::spi::transactional. I'm unsure of how to add that trait to this crate.

    Is it possible to add the transactional trait to this repo? Or do I need to fork nrf-hal and implement it there like you suggest here? https://github.com/rust-iot/rust-radio-sx127x/issues/18#issuecomment-782782909

    Cheers!

    opened by tinkhauser 2
  • README: Update supported hal versions

    README: Update supported hal versions

    Just noticed that the new release doesn't mention in the README that it supports e-h alpha.8.

    I'm actually not sure whether e-h 0.2.6 -> 0.2.7 changed the SPI traits/interfaces, but looking through the changes in #10 I don't think so.

    opened by har7an 1
  • lib: Fix doctests

    lib: Fix doctests

    by implementing the eh0_2::digital::v2::InputPin trait on the mock::OutputPin0_2 type.

    This is needed due to a trait bound introduced in the forward module that specifies that only types satisfying InputPin<Error = E> implement the eh1_0::digital::ErrorType trait.

    Fixes #11.

    opened by har7an 1
  • Doctests are broken

    Doctests are broken

    At the moment doc tests are broken for the 'digital' module.

    e.g. running cargo test on the latest commit fails with the following error.

    error[E0271]: type mismatch resolving `<OutputPin0_2 as embedded_hal::digital::v2::InputPin>::Error == Infallible`
      --> src/lib.rs:24:56
       |
    15 |  let _ = eh1_0::digital::blocking::OutputPin::set_high(&mut new);
       |          --------------------------------------------- ^^^^^^^^ expected enum `Infallible`, found `()`
       |          |
       |          required by a bound introduced by this call
       |
       = note: required because of the requirements on the impl of `embedded_hal::digital::blocking::OutputPin` for `Forward<OutputPin0_2>`
    
    error[E0277]: the trait bound `OutputPin0_2: _embedded_hal_digital_InputPin` is not satisfied
      --> src/lib.rs:24:56
       |
    15 |  let _ = eh1_0::digital::blocking::OutputPin::set_high(&mut new);
       |          --------------------------------------------- ^^^^^^^^ the trait `_embedded_hal_digital_InputPin` is not implemented for `OutputPin0_2`
       |          |
       |          required by a bound introduced by this call
       |
       = help: the trait `_embedded_hal_digital_InputPin` is implemented for `OldInputPin<T>`
       = note: required because of the requirements on the impl of `embedded_hal::digital::v2::InputPin` for `OutputPin0_2`
       = note: required because of the requirements on the impl of `embedded_hal::digital::ErrorType` for `Forward<OutputPin0_2>`
    note: required by a bound in `embedded_hal::digital::blocking::OutputPin::set_high`
      --> /home/codespace/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-hal-1.0.0-alpha.7/src/digital.rs:63:26
       |
    63 |     pub trait OutputPin: super::ErrorType {
       |                          ^^^^^^^^^^^^^^^^ required by this bound in `embedded_hal::digital::blocking::OutputPin::set_high`
    
    error[E0277]: the trait bound `OutputPin0_2: _embedded_hal_digital_InputPin` is not satisfied
      --> src/lib.rs:24:10
       |
    15 |  let _ = eh1_0::digital::blocking::OutputPin::set_high(&mut new);
       |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `_embedded_hal_digital_InputPin` is not implemented for `OutputPin0_2`
       |
       = help: the trait `_embedded_hal_digital_InputPin` is implemented for `OldInputPin<T>`
       = note: required because of the requirements on the impl of `embedded_hal::digital::v2::InputPin` for `OutputPin0_2`
       = note: required because of the requirements on the impl of `embedded_hal::digital::ErrorType` for `Forward<OutputPin0_2>`
    note: required by a bound in `embedded_hal::digital::blocking::OutputPin::set_high`
      --> /home/codespace/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-hal-1.0.0-alpha.7/src/digital.rs:63:26
       |
    63 |     pub trait OutputPin: super::ErrorType {
       |                          ^^^^^^^^^^^^^^^^ required by this bound in `embedded_hal::digital::blocking::OutputPin::set_high`
    
    
    opened by silvergasp 0
  • update problems

    update problems

    If I try to use embedded-hal 1.0.0-alpha.5 with embedded-hal-compat 0.1.3 I get many problems related to module organization changes:

    error[E0433]: failed to resolve: could not find `blocking` in `embedded_hal`
    ...
    5 | use embedded_hal::blocking::delay::{DelayMs, DelayUs};
      |                   ^^^^^^^^ could not find `blocking` in `embedded_hal`
    ...
    

    See https://docs.rs/embedded-hal/1.0.0-alpha.5/embedded_hal/?search=blocking.

    If I attempt to use embedded-hal-compat v0.3.0 I get

    16 | use embedded_hal_compat::IntoCompat;
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `IntoCompat` in the root
    

    Any advice on the proper combination for moving to e-h 1.0.0-alpha.5?

    enhancement good first issue 
    opened by pdgilbert 4
Owner
Ryan
Ryan
An asynchronous Hardware Abstraction Layer (HAL) for embedded systems

embedded-hal-async An asynchronous Hardware Abstraction Layer (HAL) for embedded systems. This crate contains asynchronous versions of the embedded-ha

Diego Barrios Romero 3 Jan 22, 2022
Rust Hardware Abstraction Layer (HAL) crate for the Vorago VA108xx family of MCUs

HAL for the Vorago VA108xx MCU family This repository contains the Hardware Abstraction Layer (HAL), which is an additional hardware abstraction on to

Institute of Space Systems 0 Dec 22, 2021
Garden monitoring system using m328p Arduino Uno boards. 100% Rust [no_std] using the avr hardware abstraction layer (avr-hal)

uno-revive-rs References Arduino Garden Controller Roadmap uno-revive-rs: roadmap Components & Controllers 1-2 Uno R3 m328p Soil moisture sensor: m328

Ethan Gallucci 1 May 4, 2022
TI LDC1312/LDC1314/LDC1612/LDC1614 inductance-to-digital converter driver for Rust embedded-hal

ldc1x1x Rust embedded-hal 1.x driver for Texas Instruments (TI) I²C inductance-to-digital converters (LDC): LDC1312/LDC1314, LDC1612/LDC1614. Includes

null 2 Oct 2, 2022
An embedded-hal driver for the TT21100 multi-touch touchscreen controller

tt21100 An embedded-hal driver for the TT21100 multi-touch touchscreen controller. If there is a feature which has not yet been implemented and which

Jesse Braham 5 Jan 9, 2023
Embedded-hal simulator.

hal-sim - embedded-hal Simulator (WIP - UNFINISHED) This crate simulates a small portion of the embedded-hal traits. Namely: GPIO ADC Additionally, it

null 6 Jan 29, 2023
Count and convert between different indexing schemes on utf8 string slices

Str Indices Count and convert between different indexing schemes on utf8 string slices. The following schemes are currently supported: Chars (or "Unic

Nathan Vegdahl 11 Dec 25, 2022
Adapters to convert between different writable APIs.

I/O adapters This crate provides adapters to compose writeable traits in the standard library. The following conversions are available: fmt::Write ->

Alex Saveau 16 Dec 21, 2023
📦 🚀 a smooth-talking smuggler of Rust HTTP functions into AWS lambda

lando ?? maintenance mode ahead ?? As of this announcement AWS not officialy supports Rust through this project. As mentioned below this projects goal

Doug Tangren 68 Dec 7, 2021
Proof of Concept / Experiment: Use IDF-HAL-LL from bare metal Rust

Proof of Concept / Experiment: Use IDF-HAL-LL from BM Rust idf-ll-compile pre-compiles a static library for ESP32C3 and ESP32 esp-ll a simple crate th

Björn Quentin 0 Aug 11, 2022
esp-serial-dbg - debugging of esp-hal based applications via serial

esp-serial-dbg - debugging of esp-hal based applications via serial About This is still work in progress! At least the contained examples should work

Björn Quentin 3 Aug 23, 2022
HAL for the CH58x family of microcontrollers. BLE 5.3, RISC-V Qingke V4.

ch58x-hal HAL for the CH58x RISC-V BLE microcotrollers from WCH. This crate is under random and active development. DO NOT USE in production. This sho

WCH MCU for Rust 3 Oct 24, 2023
A tracing layer for macOS/iOS's `oslog`

tracing_oslog This is a tracing layer for the Apple OS logging framework. Activities are used to handle spans, Example use tracing_oslog::OsLogger; l

Lucy 12 Dec 6, 2022
Hardware Abstraction Layer for ATmega32U4

Deprecation Note: This crate will soon be deprecated in favor of avr-hal. avr-hal is a new approach to writing the HAL crate, that was designed with s

Rahix 3 May 16, 2021
Hardware Abstraction Layer for AVR microcontrollers and common boards

avr-hal Hardware Abstraction Layer for AVR microcontrollers and common boards (for example Arduino). Based on the avr-device crate. This is a new vers

Rahix 776 Jan 1, 2023
Tracing layer to quickly inspect spans and events

tracing-texray First, a word of warning: This is alpha software. Don't run this in prod or anywhere where a panic would ruin your day. tracing-texray

Russell Cohen 23 Dec 3, 2022
The classic game Pong, written in lambda calculus, and a thin layer of Rust.

What? The good old game Pong, written in lambda calculus, and a thin layer of Rust. Why? I was bored. No, seriously, why? Everyone keeps saying that l

null 2 Aug 14, 2022
AWS Cloudwatch layer for tracing-subscriber

tracing-cloudwatch tracing-cloudwatch is a custom tracing-subscriber layer that sends your application's tracing events(logs) to AWS CloudWatch Logs.

ymgyt 7 May 14, 2023
A crate providing a tracing-subscriber layer for formatting events so Datadog can parse them

Datadog Formatting Layer A crate providing a tracing-subscriber layer for formatting events so Datadog can parse them. Features Provides a layer for t

Open Schnick 4 Jun 22, 2023