Expand description
One import for the traits whose methods this HAL is used through.
Traits are re-exported anonymously (as _): their methods arrive, their names
do not. Types are not re-exported — import those from their own modules.
ⓘ
use gd32e2_hal::prelude::*; // everything
use gd32e2_hal::prelude::gpio::*; // or one peripheral at a timeThe glob at this level covers every peripheral and takes usart::io for the
serial traits. usart::nb is the other choice, never both: their read and
write land on the same type, and two traits of one name in scope make every
such call ambiguous (E0034).
Re-exports§
pub use self::adc::*;pub use self::dma::*;pub use self::exti::*;pub use self::fmc::*;pub use self::gpio::*;pub use self::i2c::*;pub use self::rcu::*;pub use self::spi::*;pub use self::syscfg::*;pub use self::time::*;pub use self::timer::*;pub use self::usart::io::*;pub use self::watchdog::*;
Modules§
- adc
- ADC entry point.
- dma
- DMA entry point.
- exti
- EXTI entry point.
- fmc
- Flash controller entry point.
- gpio
- Port entry point and pin state.
- i2c
- I²C transactions.
- rcu
- Clock tree entry point.
- spi
- SPI transfers.
- syscfg
- System configuration entry point.
- time
- Suffixes for durations and frequencies:
500.millis(),100.kHz(). - timer
- Timer entry point, delays, PWM duty, and
block!for capture reads. - usart
- Serial traits, in two flavours — take one.
- watchdog
- Watchdog entry points.