Skip to main content

Module hal

Module hal 

Expand description

Provides MCU-specific items.

This module dispatches between one of the following crate, depending on the target MCU family:

ManufacturerMCU familyDocs rendered forItems imported
EspressifESP32ESP32-C6ariel-os-esp::*
Nordic SemiconductornRFnRF52840ariel-os-nrf::*
Raspberry PiRPRP2040ariel-os-rp::*
STMicroelectronicsSTM32STM32WB55RGariel-os-stm32::*

Documentation is only rendered for the MCUs listed in the table above, but many others are supported. To render the docs locally for the MCU of your choice, adapt the cargo doc command used to generate documentation for the relevant crate.

§Portability

To ensure portability of your application, it is recommended to use the generic, MCU-family-agnostic items provided in other modules. Items from this module should only be used when MCU-specific settings are necessary for your application.

Macros§

define_peripherals
This macro allows to obtain peripherals from the one listed in the peripherals module exported by this crate.
define_uartuart
Creates a struct of the given name, containing all peripherals needed to set up a UART.
define_uartsuart
This macro defines types which can be used as peripherals in autostart tasks for accessing UARTs as defined in board descriptions.
group_peripherals
This macro allows to group peripheral structs defined with define_peripherals! into a single peripheral struct.

Traits§

IntoPeripheral
This is an adapter trait necessary for compatibility with the underlying HALs.