Expand description
§ch57x-pac
Peripheral Access Crate (PAC) for WCH CH57x RISC-V BLE microcontrollers.
This crate is generated using svd2rust and provides register-level access to CH57x peripherals.
§Scope
no_stdPAC for CH57x-family register blocks- Interrupt definitions and vector table support via
rtfeature - Optional
critical-sectionintegration for embedded Rust ecosystem crates
§Cargo
[dependencies]
ch57x-pac = "0.1.3"§Features
rt(default): exports interrupt symbols/vector table glue expected by runtime cratescritical-section: enablescritical-sectionsupport
§Minimal Usage
let p = ch57x_pac::Peripherals::take().unwrap();
p.sys.r8_clk_sys_cfg().modify(|_, w| unsafe { w.bits(0) });§docs.rs Notes
docs.rs builds with:
- target:
riscv32imac-unknown-none-elf - features:
rt,critical-section
§CI/CD
- CI runs
cargo checkandcargo docon every push and pull request. - Publish workflow is configured to publish from version tags (or manual dispatch).
The publish job requires repository secret
CRATES_IO_TOKEN.
§License
Licensed under either:
- Apache License, Version 2.0
- MIT license
Generated Register API Peripheral access API for WCH CH57x microcontrollers (generated with svd2rust).
You can find an overview of the generated API here.
Modules§
- generic
- Common register and bit access and modify traits
- pfic
- Program Fast Interrupt Controller
- pwmx
- PWMx register
- spi0
- SPI0 register
- sys
- System Control Register
- systick
- Systick register
- tmr0
- Timer0 register
- tmr1
- Timer1 register
- tmr2
- Timer2 register
- tmr3
- Timer3 register
- uart0
- UART0 register
- uart1
- UART1 register
- uart2
- UART2 register
- uart3
- UART3 register
- usb
- USB register
Structs§
- Peripherals
- All the peripherals.
Enums§
- Interrupt
- Enumeration of all the interrupts.
Constants§
- NVIC_
PRIO_ BITS - Number available in the NVIC for configuring priority