Crate stm32_hal2[−][src]
Modules
adc | API for the ADC (Analog to Digital Converter) |
clocks | This module contains clock configurations for various MCUs. They tend to be significantly different from one another, so we’ve feature-gated these files, rather than code within the files, to differentiate families. |
crc | Cyclic Redundancy Check (CRC) support |
dac | Digital to Analog converter. |
delay | Hardware delays, using Cortex-m systick. |
dma | Direct Memory Access Engine |
flash | Read and write onboard flash memory. |
gpio | This module provides functionality for General Purpose Input and Output (GPIO) pins,
including all GPIOx register functions, and interrupts.
It includes implementations of |
i2c | Inter-Integrated Circuit (I2C) bus. Also supports SMBUS. Implements traits from |
low_power | This module contains code used to place the MCU in low power modes.
Reference section 5.3.3: |
pac | |
prelude | In the prelude, we export helper macros. |
rtc | Interface to the real time clock. For more details, see ST AN4759 |
serial | Serial module. Supports U[S]ART, CAN, and RS485 functionality, with DMA access.
Implements traits from |
spi | Serial Peripheral Interface (SPI) bus. Implements traits from |
timer | Timers. Includes initialization, countdown functionality, interrupts, and PWM features. |
traits | Traits used across the library. These may find general use beyond this library, and this module may eventually be moved to a standalone crate. |
usart | This module allows for serial communication using the STM32 USART module. |
usb | USB support, including for simulated COM ports. This module is a thin wrapper required to work with
the |
Macros
access_global | Syntax helper for getting global variables of the form |
make_globals | Syntax helper for setting global variables of the form |
make_simple_globals | Syntax helper for setting global variables of the form |
rcc_en_reset | Enables and resets peripheral clocks on various RCC registesr.
The first argument is a |
Functions
debug_workaround | Workaround due to debugger disconnecting in WFI (and low-power) modes. This affects most (all?) STM32 devices. In production on battery-powered devices that don’t use DMA, consider removing this, to prevent power use by the DMA clock. For why we enable the DMA clock, see STM32F446 errata, section 2.1.1. |