Iron Coder's common_hal_interface
This is a common interface between major Rust HALs such as arduino-hal, rp-hal, and esp-hal. It functions primarily as a macro-based compatibility layer between boards to make programming in Rust across boards slightly more uniform.
Usage:
To use common-hal-interface, simply include the crate as a dependency in Cargo.toml, and specify one HAL/board specific feature to use.
Example:
common_hal_interface = {version="*", features= ["arduino-uno"]}
or, for an example with espressif's hal:
common_hal_interface = {version="*", features= ["esp"]}
An example of a macro in this crate is as follows:
This macro takes in four parameters and uses them to store important objects such as dp and pins for arduino, also setting up the serial communication and returning that to serial
An example of its use is as follows:
use _unwrap_infallible_UnwrapInfallible;
use panic_halt as _;
use *;
!