#pic32 #hal #hardware-abstraction-layer #mips #abstraction-layer #api-access #no-std

no-std pic32-hal

Hardware Abstraction Layer (HAL) for PIC32 microcontrollers

11 releases (6 breaking)

0.10.1 Jul 31, 2023
0.9.0 Jun 9, 2023
0.8.0 Jan 1, 2023
0.7.1 Sep 28, 2022
0.4.1 Oct 11, 2021

#93 in Hardware support

Download history 5000/week @ 2023-12-04 5375/week @ 2023-12-11 4836/week @ 2023-12-18 4853/week @ 2023-12-25 4897/week @ 2024-01-01 4673/week @ 2024-01-08 4791/week @ 2024-01-15 5230/week @ 2024-01-22 4708/week @ 2024-01-29 4158/week @ 2024-02-05 4165/week @ 2024-02-12 3743/week @ 2024-02-19 3569/week @ 2024-02-26 3303/week @ 2024-03-04 3004/week @ 2024-03-11 2509/week @ 2024-03-18

12,885 downloads per month
Used in 2 crates

MIT/Apache

305KB
7.5K SLoC

Rust 6K SLoC // 0.0% comments GNU Style Assembly 1K SLoC // 0.1% comments Alex 434 SLoC Python 2 SLoC // 1.0% comments

pic32-hal

Crates.io docs.rs

A hardware abstraction layer for some PIC32 microcontrollers.

This crate provides a thin low-level API on top of the register access API implemented by the PAC crate. The following HAL functionality is available

  • basic clock control, including reference clock generator
  • GPIO
  • UART
  • USB
  • access to the MIPS core timer
  • DMA channels
  • I2C peripheral
  • SPI peripheral
  • interrupt controller
  • Peripheral Pin Select (PPS)
  • 10-bit analog-to-digital converter (ADC)
  • Timer
  • Output Compare

Some of the modules implement the embedded-hal API so that device drivers (e. g. for displays) using this API can access PIC32 peripherals.

Everything here is work in progress. Examples can be found in the git repository.

Dependencies

~0.5–14MB
~439K SLoC