mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-09-28 12:51:04 +00:00
Clippy for all examples
This commit is contained in:
parent
17790a01db
commit
d08f558588
7
.github/workflows/ci-esp-idf-next.yml
vendored
7
.github/workflows/ci-esp-idf-next.yml
vendored
@ -83,6 +83,13 @@ jobs:
|
||||
unzip "$HOME/.cargo/bin/ldproxy.zip" -d "$HOME/.cargo/bin/"
|
||||
chmod a+x $HOME/.cargo/bin/ldproxy
|
||||
|
||||
- name: Clippy | Examples
|
||||
env:
|
||||
ESP_IDF_VERSION: ${{ matrix.idf-version }}
|
||||
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
|
||||
RUSTFLAGS: "${{ matrix.idf-version != 'release/v4.4' && '--cfg espidf_time64' || matrix.idf-version == 'release/v4.4' && '--cfg espidf_time32' }}"
|
||||
run: cargo clippy --examples --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings
|
||||
|
||||
- name: Build | Examples
|
||||
env:
|
||||
ESP_IDF_VERSION: ${{ matrix.idf-version }}
|
||||
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -89,6 +89,14 @@ jobs:
|
||||
unzip "$HOME/.cargo/bin/ldproxy.zip" -d "$HOME/.cargo/bin/"
|
||||
chmod a+x $HOME/.cargo/bin/ldproxy
|
||||
|
||||
- name: Clippy | Examples
|
||||
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4'
|
||||
env:
|
||||
ESP_IDF_VERSION: ${{ matrix.idf-version }}
|
||||
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
|
||||
RUSTFLAGS: "${{ matrix.idf-version != 'release/v4.4' && '--cfg espidf_time64' || matrix.idf-version == 'release/v4.4' && '--cfg espidf_time32' }}"
|
||||
run: cargo clippy --examples --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings
|
||||
|
||||
- name: Build | Examples
|
||||
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4'
|
||||
env:
|
||||
|
@ -1,6 +1,7 @@
|
||||
//! ADC example, reading a value form a pin and printing it on the terminal
|
||||
//!
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
use esp_idf_sys as _; // If using the `binstart` feature of `esp-idf-sys`, always keep this module imported
|
||||
|
@ -1,6 +1,7 @@
|
||||
//! ADC oneshot example, reading a value form a pin and printing it on the terminal
|
||||
//! requires ESP-IDF v5.0 or newer
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
use std::thread;
|
||||
|
@ -13,6 +13,7 @@
|
||||
//! 3. Read/write register, write a value to a register addr and read it back.
|
||||
//!
|
||||
#![allow(unused)]
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
use esp_idf_hal::delay::BLOCK;
|
||||
|
@ -6,6 +6,7 @@
|
||||
//! threshold and track how much that accounts for and provide an i32 value result
|
||||
//!
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
#[cfg(any(esp32, esp32s2, esp32s3))]
|
||||
|
@ -15,6 +15,7 @@
|
||||
//! * Taking a [`Pin`] and [`Channel`] by ref mut, so that they can be used again later.
|
||||
//!
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
#[cfg(any(feature = "rmt-legacy", esp_idf_version_major = "4"))]
|
||||
|
@ -5,6 +5,7 @@
|
||||
//! Based off the ESP-IDF rmt musical buzzer example:
|
||||
//! https://github.com/espressif/esp-idf/blob/b092fa073047c957545a0ae9504f04972a8c6d74/examples/peripherals/rmt/musical_buzzer/main/musical_buzzer_example_main.c
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
#[cfg(any(feature = "rmt-legacy", esp_idf_version_major = "4"))]
|
||||
|
@ -9,6 +9,7 @@
|
||||
//! Datasheet (PDF) for a WS2812, which explains how the pulses are to be sent:
|
||||
//! https://cdn-shop.adafruit.com/datasheets/WS2812.pdf
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
#[cfg(any(feature = "rmt-legacy", esp_idf_version_major = "4"))]
|
||||
|
@ -42,6 +42,7 @@
|
||||
//! * Usage of the onewire bus driver interface.
|
||||
//! * How to iterate through a device search to discover devices on the bus.
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
#[cfg(all(
|
||||
|
@ -18,6 +18,7 @@
|
||||
//! level0 = High dur0 = PulseTicks(210) level1 = Low dur1 = PulseTicks(0)
|
||||
//! Tx Loop
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
#[cfg(any(feature = "rmt-legacy", esp_idf_version_major = "4"))]
|
||||
|
@ -1,3 +1,4 @@
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
#[cfg(all(esp_idf_soc_temp_sensor_supported, esp_idf_version_major = "5"))]
|
||||
|
Loading…
x
Reference in New Issue
Block a user