Expand description

The prelude.

To use esp8266_hal effectively, a number of traits and types need to be imported. Instead of importing them one by one manually, the prelude contains the most commonly used imports that are used around application runtime management.

This can be imported as use esp8266_hal::prelude::*.

Re-exports

pub use crate::efuse::DPortExt;
pub use crate::flash::SPI0Ext;
pub use crate::gpio::GpioExt;
pub use crate::rng::RngExt;
pub use crate::rtccntl::RtcControlExt;
pub use crate::spi::SPIExt;
pub use crate::time::U32Ext;
pub use crate::timer::TimerExt;
pub use crate::uart::UART0Ext;
pub use crate::uart::UART1Ext;
pub use crate::watchdog::WatchdogExt;
pub use embedded_hal::digital::v2::InputPin as _;
pub use embedded_hal::digital::v2::OutputPin as _;
pub use embedded_hal::digital::v2::StatefulOutputPin as _;
pub use embedded_hal::digital::v2::ToggleableOutputPin as _;

Modules

Exception handling

Traits

Trait for cancelable countdowns.

A count down timer

Marker trait that indicates that a timer is periodic

Input capture

Pulse Width Modulation

A single PWM channel / pin

Quadrature encoder interface

ADCs that sample on single channels per request, and do so at the time of the request.

Write half of a serial interface (blocking variant)

Single digital input pin

Single digital push-pull output pin

Output pin that can be toggled

Read half of a serial interface

Write half of a serial interface

Full duplex (master mode)

Feeds an existing watchdog to ensure the processor isn’t reset. Sometimes commonly referred to as “kicking” or “refreshing”.

Disables a running watchdog timer so the processor won’t be reset.

Enables A watchdog timer to reset the processor if software is frozen or stalled.

Attribute Macros

Marks a function as the main function to be called on program start

Marks a function as the exception handler

Marks a function as an interrupt handler

This attribute allows placing statics, constants and functions into ram.