Skip to main content Crate ch32_hal Copy item path Source pub use ch32_metapac as pac;adc ADC, Analog to Digital Converter can crc CRC-32 calculation unit. dac Digital to Analog Converter (DAC) debug The debug module. delay dma DMA embassy eth Ethernet (ETH) exti flash Flash memory (FLASH)
CH32 FLASH is relatively close to STM32. This module is heavily inspired from embassy-stm32 gpio GPIO i2c Inter-Integrated-Circuit (I2C) interrupt Interrupt definitions. mode Operating modes for peripherals. otg_fs WCH USBFS + OTG (kind: otg / otg_v2) — v2fs device layout + OTG regs.
USB_FS and OTG_FS device mode peripheral driver
Note that this currently only implements device mode peripherals Types for the peripheral singletons. prelude rcc Reset and clock control (RCC). rng Hardware random number generator with blocking and interrupt-driven reads. rtc Real-time clock (RTC). sdio Secure Digital / MultiMedia Card (SDMMC) signature E-signature values for CH32 series MCUs spi SPI, Serial Peripheral Interface time Time units timer Timers, PWM. usart USART - Universal Synchronous Asynchronous Receiver Transmitter usb Shared USB endpoint-buffer helpers (not a controller driver). usbhs USB high-speed (kind: usbhs). H4 shares the v4x7 register map; v3
is its own layout.
USBHS device mode peripheral driver
Note that this currently only implements device mode wdg Watchdog Timer (IWDG, WWDG) bind_interrupts interrupt_mod Generate a standard mod interrupt for a HAL. print println try_println println! over SDI that drops the message rather than spinning when the
console is not armed. Use it in control loops; use [println!] when the
console is known to be attached.Config Peri An exclusive reference to a peripheral. Peripherals Struct containing all the peripheral singletons. PeripheralType Marker trait for peripheral types. RccPeripheral RemapPeripheral init Initialize the HAL with the provided configuration. entry interrupt Marks a function as an interrupt handler. (Wrapping as a mret function)