When we release new imxrt-hal peripherals in a backwards-compatible package, we risk breaking users who prefer to mix the HAL with imxrt-ral.
use imxrt_hal as hal;
use imxrt_ral as ral;
// The HAL doesn't support an ADC driver yet.
// We maintain our own, custom driver.
mod custom_adc;
let peripheral = hal::Peripherals::take().unwrap();
let adc = custom_adc::new(
ral::adc::ADC1::take().unwrap() // <-- panics if the HAL takes the ADC driver for itself.
);
The 0.4.2 HAL release introduced an ADC peripheral. Suppose this user designed to the 0.4.1 HAL, and wanted to implement their own ADC peripheral. When this user upgrades from 0.4.1 to 0.4.2, they observe a panic!() at the indicated call site.
This just hit me while reviewing #115. Looks like the 0.4.2 release is the only example of this breakage in the 0.4 series.
Any thoughts on how to proceed?
When we release new
imxrt-halperipherals in a backwards-compatible package, we risk breaking users who prefer to mix the HAL withimxrt-ral.The 0.4.2 HAL release introduced an ADC peripheral. Suppose this user designed to the 0.4.1 HAL, and wanted to implement their own ADC peripheral. When this user upgrades from 0.4.1 to 0.4.2, they observe a
panic!()at the indicated call site.This just hit me while reviewing #115. Looks like the 0.4.2 release is the only example of this breakage in the 0.4 series.
Any thoughts on how to proceed?