#no-std #mips #pic32 #hal

no-std pic32-hal

Hardware Abstraction Layer (HAL) for PIC32 microcontrollers

6 releases (3 breaking)

new 0.7.0 Aug 5, 2022
0.6.1 Jan 25, 2022
0.5.0 Dec 30, 2021
0.4.1 Oct 11, 2021

#268 in Embedded development

Download history 845/week @ 2022-04-21 895/week @ 2022-04-28 753/week @ 2022-05-05 987/week @ 2022-05-12 1018/week @ 2022-05-19 1029/week @ 2022-05-26 1177/week @ 2022-06-02 1122/week @ 2022-06-09 967/week @ 2022-06-16 959/week @ 2022-06-23 1037/week @ 2022-06-30 1035/week @ 2022-07-07 1022/week @ 2022-07-14 978/week @ 2022-07-21 1063/week @ 2022-07-28 1086/week @ 2022-08-04

4,307 downloads per month
Used in ockam_transport_ble

MIT/Apache

175KB
4.5K SLoC

Rust 3.5K SLoC // 0.0% comments GNU Style Assembly 1K SLoC // 0.1% comments 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)

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.


lib.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 MCU can be selected by means of specific features.

Feature Devices
pic32mx1xxfxxxb 28-pin PIC32MX1xx
pic32mx2xxfxxxb 28-pin PIC32MX2xx
pic32mx2x4fxxxb 28-pin PIC32MX2xx XLP

This documentation has been generated with --features pic32mx2xxfxxxb.

Dependencies

~76MB
~2.5M SLoC