mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-28 21:00:59 +00:00
Add more documentation to the examples
This commit is contained in:
parent
faf646375f
commit
70a9437f27
@ -1,3 +1,7 @@
|
||||
//! Blinks an LED
|
||||
//!
|
||||
//! This assumes that a LED is connected to the pin assigned to `led`. (GPIO15)
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
//! GPIO interrupt
|
||||
//!
|
||||
//! This prints "Interrupt" when the boot button is pressed.
|
||||
//! It also blinks an LED like the blinky example.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to write text to serial0.
|
||||
//! You can see the output with `espflash` if you provide the `--monitor` option
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! This shows how to spawn a task on the second core.
|
||||
//! The first core will print the value of a counter which is incremented by the
|
||||
//! second core.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
//! This shows how to use RTC memory.
|
||||
//! RTC memory is retained during resets and during most sleep modes.
|
||||
//! Initialized memory is always re-initialized on startup.
|
||||
//! Uninitialzed memory isn't initialized on startup and can be used to keep
|
||||
//! data during resets. Zeroed memory is initialized to zero on startup.
|
||||
//! We can also run code from RTC memory.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to read selected information from eFuses.
|
||||
//! e.g. the MAC address
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! This shows how to use the TIMG peripheral interrupts.
|
||||
//! There is TIMG0 and TIMG1 each of them containing two general purpose timers
|
||||
//! and a watchdog timer.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! Blinks an LED
|
||||
//!
|
||||
//! This assumes that a LED is connected to the pin assigned to `led`. (GPIO5)
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
//! GPIO interrupt
|
||||
//!
|
||||
//! This prints "Interrupt" when the boot button is pressed.
|
||||
//! It also blinks an LED like the blinky example.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to write text to serial0.
|
||||
//! You can see the output with `espflash` if you provide the `--monitor` option
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
//! This shows how to use RTC memory.
|
||||
//! RTC memory is retained during resets and during most sleep modes.
|
||||
//! Initialized memory is always re-initialized on startup.
|
||||
//! Uninitialzed memory isn't initialized on startup and can be used to keep
|
||||
//! data during resets. Zeroed memory is initialized to zero on startup.
|
||||
//! We can also run code from RTC memory.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to read selected information from eFuses.
|
||||
//! e.g. the MAC address
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to use the SYSTIMER peripheral including interrupts.
|
||||
//! It's an additional timer besides the TIMG peripherals.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! This shows how to use the TIMG peripheral interrupts.
|
||||
//! There is TIMG0 and TIMG1 each of them containing a general purpose timer and
|
||||
//! a watchdog timer.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
//! This shows how to output text via USB Serial/JTAG.
|
||||
//! You need to connect via the Serial/JTAG interface to see any output.
|
||||
//! Most dev-kits use a USB-UART-bridge - in that case you won't see any output.
|
||||
//! This will work with the ESP32-C3-DevKit-RUST-1
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! Blinks an LED
|
||||
//!
|
||||
//! This assumes that a LED is connected to the pin assigned to `led`. (GPIO4)
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
//! GPIO interrupt
|
||||
//!
|
||||
//! This prints "Interrupt" when the boot button is pressed.
|
||||
//! It also blinks an LED like the blinky example.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to write text to serial0.
|
||||
//! You can see the output with `espflash` if you provide the `--monitor` option
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
//! This shows how to use RTC memory.
|
||||
//! RTC memory is retained during resets and during most sleep modes.
|
||||
//! Initialized memory is always re-initialized on startup.
|
||||
//! Uninitialzed memory isn't initialized on startup and can be used to keep
|
||||
//! data during resets. Zeroed memory is initialized to zero on startup.
|
||||
//! We can also run code from RTC memory.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to read selected information from eFuses.
|
||||
//! e.g. the MAC address
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to use the SYSTIMER peripheral including interrupts.
|
||||
//! It's an additional timer besides the TIMG peripherals.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! This shows how to use the TIMG peripheral interrupts.
|
||||
//! There is TIMG0 and TIMG1 each of them containing two general purpose timers
|
||||
//! and a watchdog timer.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! This demos the watchdog timer.
|
||||
//! Basically the same as `hello_world` but if you remove the call to
|
||||
//! `wdt.feed()` the watchdog will reset the system.#![no_std]
|
||||
//! `wdt.feed()` the watchdog will reset the system.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! Blinks an LED
|
||||
//!
|
||||
//! This assumes that a LED is connected to the pin assigned to `led`. (GPIO4)
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
//! GPIO interrupt
|
||||
//!
|
||||
//! This prints "Interrupt" when the boot button is pressed.
|
||||
//! It also blinks an LED like the blinky example.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to write text to serial0.
|
||||
//! You can see the output with `espflash` if you provide the `--monitor` option
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! This shows how to spawn a task on the second core.
|
||||
//! The first core will print the value of a counter which is incremented by the
|
||||
//! second core.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
//! This shows how to use RTC memory.
|
||||
//! RTC memory is retained during resets and during most sleep modes.
|
||||
//! Initialized memory is always re-initialized on startup.
|
||||
//! Uninitialzed memory isn't initialized on startup and can be used to keep
|
||||
//! data during resets. Zeroed memory is initialized to zero on startup.
|
||||
//! We can also run code from RTC memory.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to read selected information from eFuses.
|
||||
//! e.g. the MAC address
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! This shows how to use the SYSTIMER peripheral including interrupts.
|
||||
//! It's an additional timer besides the TIMG peripherals.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! This shows how to use the TIMG peripheral interrupts.
|
||||
//! There is TIMG0 and TIMG1 each of them containing two general purpose timers
|
||||
//! and a watchdog timer.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
//! This shows how to output text via USB Serial/JTAG.
|
||||
//! You need to connect via the Serial/JTAG interface to see any output.
|
||||
//! Most dev-kits use a USB-UART-bridge - in that case you won't see any output.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! This demos the watchdog timer.
|
||||
//! Basically the same as `hello_world` but if you remove the call to
|
||||
//! `wdt.feed()` the watchdog will reset the system.#![no_std]
|
||||
//! `wdt.feed()` the watchdog will reset the system.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
Loading…
x
Reference in New Issue
Block a user