HAL
A library that turns raw registers into easy, safe functions like "set this pin high".
A hardware abstraction layer wraps a PAC in safe, chip-specific drivers (GPIO, timers, I2C, SPI) and implements the embedded-hal traits so portable drivers can use them.
Examples
With esp-hal, switching the fan is
fan.set_high()on anOutputfor GPIO8, with no register writes orunsafein your code.esp-hal 1.0.0 is the ESP32-C6's HAL, giving safe drivers for GPIO, I2C, SPI, UART and timers on top of the PAC.