mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-28 12:50:53 +00:00
Remove remaining references to embedded-hal-02 for GPIO examples (#1392)
This commit is contained in:
parent
969f9a15f6
commit
b8ca1323d0
@ -1166,11 +1166,13 @@ where
|
||||
GpioPin { _mode: PhantomData }
|
||||
}
|
||||
|
||||
/// Configures the pin into alternate mode one.
|
||||
pub fn into_alternate_1(self) -> GpioPin<Alternate<AF1>, GPIONUM> {
|
||||
self.init_output(AlternateFunction::Function1, false);
|
||||
GpioPin { _mode: PhantomData }
|
||||
}
|
||||
|
||||
/// Configures the pin into alternate mode two.
|
||||
pub fn into_alternate_2(self) -> GpioPin<Alternate<AF2>, GPIONUM> {
|
||||
self.init_output(AlternateFunction::Function2, false);
|
||||
GpioPin { _mode: PhantomData }
|
||||
@ -1334,6 +1336,7 @@ where
|
||||
Self: GpioProperties,
|
||||
<Self as GpioProperties>::PinType: IsAnalogPin,
|
||||
{
|
||||
/// Configures the pin into a an [Analog] pin.
|
||||
pub fn into_analog(self) -> GpioPin<Analog, GPIONUM> {
|
||||
crate::soc::gpio::internal_into_analog(GPIONUM);
|
||||
|
||||
@ -1377,6 +1380,7 @@ impl<MODE, TYPE> AnyPin<MODE, TYPE>
|
||||
where
|
||||
TYPE: PinType,
|
||||
{
|
||||
/// Degrade the pin to remove the pin number generics.
|
||||
pub fn degrade(self) -> AnyPin<MODE> {
|
||||
AnyPin {
|
||||
inner: self.inner,
|
||||
|
@ -6,12 +6,10 @@
|
||||
//! Additionally demonstrates passing GPIO to a function in a generic way.
|
||||
|
||||
//% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3
|
||||
//% FEATURES: embedded-hal-02
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use embedded_hal_02::digital::v2::{InputPin, ToggleableOutputPin};
|
||||
use esp_backtrace as _;
|
||||
use esp_hal::{
|
||||
clock::ClockControl,
|
||||
|
@ -4,7 +4,7 @@
|
||||
//! signal set by the task running on the other core.
|
||||
|
||||
//% CHIPS: esp32 esp32s3
|
||||
//% FEATURES: embassy embassy-executor-thread embassy-time-timg0 embassy-generic-timers embedded-hal-02
|
||||
//% FEATURES: embassy embassy-executor-thread embassy-time-timg0 embassy-generic-timers
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
@ -15,7 +15,6 @@ use core::ptr::addr_of_mut;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_sync::{blocking_mutex::raw::CriticalSectionRawMutex, signal::Signal};
|
||||
use embassy_time::{Duration, Ticker};
|
||||
use embedded_hal_02::digital::v2::OutputPin;
|
||||
use esp_backtrace as _;
|
||||
use esp_hal::{
|
||||
clock::ClockControl,
|
||||
|
@ -4,7 +4,7 @@
|
||||
//! signal set by the task running on the other core.
|
||||
|
||||
//% CHIPS: esp32 esp32s3
|
||||
//% FEATURES: embassy embassy-executor-interrupt embassy-time-timg0 embassy-generic-timers embedded-hal-02
|
||||
//% FEATURES: embassy embassy-executor-interrupt embassy-time-timg0 embassy-generic-timers
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
@ -14,7 +14,6 @@ use core::ptr::addr_of_mut;
|
||||
|
||||
use embassy_sync::{blocking_mutex::raw::CriticalSectionRawMutex, signal::Signal};
|
||||
use embassy_time::{Duration, Ticker};
|
||||
use embedded_hal_02::digital::v2::OutputPin;
|
||||
use esp_backtrace as _;
|
||||
use esp_hal::{
|
||||
clock::ClockControl,
|
||||
|
@ -2,7 +2,7 @@
|
||||
//! Connect GPIO5 to GPIO4
|
||||
|
||||
//% CHIPS: esp32 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3
|
||||
//% FEATURES: async embassy embassy-executor-thread embassy-time-timg0 embassy-generic-timers embedded-hal-02
|
||||
//% FEATURES: async embassy embassy-executor-thread embassy-time-timg0 embassy-generic-timers
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
@ -10,7 +10,6 @@
|
||||
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use embedded_hal_02::digital::v2::ToggleableOutputPin;
|
||||
use esp_backtrace as _;
|
||||
use esp_hal::{
|
||||
clock::ClockControl,
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use embedded_hal_async::digital::Wait;
|
||||
use esp_backtrace as _;
|
||||
use esp_hal::{
|
||||
clock::ClockControl,
|
||||
|
@ -1,12 +1,10 @@
|
||||
//! Control LED on GPIO1 by the BOOT-BUTTON via ETM
|
||||
|
||||
//% CHIPS: esp32c6 esp32h2
|
||||
//% FEATURES: embedded-hal-02
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use embedded_hal_02::digital::v2::OutputPin;
|
||||
use esp_backtrace as _;
|
||||
use esp_hal::{
|
||||
etm::Etm,
|
||||
|
@ -15,8 +15,7 @@ use esp_hal::{
|
||||
clock::ClockControl,
|
||||
delay::Delay,
|
||||
gpio,
|
||||
interrupt::{self, Priority},
|
||||
peripherals::{Interrupt, Peripherals, UART0},
|
||||
peripherals::{Peripherals, UART0},
|
||||
prelude::*,
|
||||
uart::{
|
||||
config::{AtCmdConfig, Config},
|
||||
|
@ -24,12 +24,10 @@
|
||||
//! so no immediate neighbor is available.
|
||||
|
||||
//% CHIPS: esp32c2 esp32c3 esp32c6 esp32h2 esp32s3
|
||||
//% FEATURES: embedded-hal-02
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use embedded_hal_02::digital::v2::{InputPin, OutputPin};
|
||||
use esp_backtrace as _;
|
||||
use esp_hal::{
|
||||
clock::ClockControl,
|
||||
|
Loading…
x
Reference in New Issue
Block a user