12 releases (7 breaking)

0.11.0 Apr 7, 2024
0.10.1 Jul 31, 2023
0.10.0 Jun 24, 2023
0.8.0 Jan 1, 2023
0.4.1 Oct 11, 2021

#112 in Hardware support

Download history 3912/week @ 2024-02-15 3721/week @ 2024-02-22 3414/week @ 2024-02-29 3252/week @ 2024-03-07 2786/week @ 2024-03-14 2428/week @ 2024-03-21 2224/week @ 2024-03-28 2313/week @ 2024-04-04 2044/week @ 2024-04-11 2140/week @ 2024-04-18 2215/week @ 2024-04-25 2458/week @ 2024-05-02 1068/week @ 2024-05-09 1047/week @ 2024-05-16 1075/week @ 2024-05-23 1072/week @ 2024-05-30

4,694 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
~441K SLoC