From e5e1e5b87b208890c7c5a69b8620f49414c7363e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Mon, 9 Sep 2024 23:06:40 +0200 Subject: [PATCH] Typos and endless recursion --- esp-hal/src/gpio/mod.rs | 28 ++++++------------- examples/src/bin/embassy_i2c.rs | 2 +- .../embassy_i2c_bmp180_calibration_data.rs | 2 +- hil-test/tests/i2c.rs | 2 +- hil-test/tests/spi_full_duplex.rs | 2 +- hil-test/tests/spi_full_duplex_dma.rs | 2 +- hil-test/tests/spi_full_duplex_dma_pcnt.rs | 2 +- hil-test/tests/spi_half_duplex_read.rs | 2 +- hil-test/tests/twai.rs | 2 +- hil-test/tests/uart.rs | 2 +- hil-test/tests/uart_async.rs | 2 +- hil-test/tests/uart_tx_rx.rs | 2 +- hil-test/tests/uart_tx_rx_async.rs | 2 +- 13 files changed, 20 insertions(+), 32 deletions(-) diff --git a/esp-hal/src/gpio/mod.rs b/esp-hal/src/gpio/mod.rs index f298e495525..88f33661c46 100644 --- a/esp-hal/src/gpio/mod.rs +++ b/esp-hal/src/gpio/mod.rs @@ -2174,19 +2174,13 @@ pub(crate) mod internal { } fn connect_input_to_peripheral(&mut self, signal: InputSignal, _: private::Internal) { - handle_gpio_input!(&mut self.0, target, { - PeripheralInputPin::connect_input_to_peripheral(target, signal, private::Internal) - }) + interconnect::InputSignal::new(self.degrade_internal(private::Internal)) + .connect_input_to_peripheral(signal, private::Internal); } fn disconnect_input_from_peripheral(&mut self, signal: InputSignal, _: private::Internal) { - handle_gpio_input!(&mut self.0, target, { - PeripheralInputPin::disconnect_input_from_peripheral( - target, - signal, - private::Internal, - ) - }) + interconnect::InputSignal::new(self.degrade_internal(private::Internal)) + .disconnect_input_from_peripheral(signal, private::Internal); } } @@ -2316,9 +2310,8 @@ pub(crate) mod internal { } fn connect_peripheral_to_output(&mut self, signal: OutputSignal, _: private::Internal) { - handle_gpio_output!(&mut self.0, target, { - PeripheralOutputPin::connect_peripheral_to_output(target, signal, private::Internal) - }) + interconnect::OutputSignal::new(self.degrade_internal(private::Internal)) + .connect_peripheral_to_output(signal, private::Internal); } fn disconnect_from_peripheral_output( @@ -2326,13 +2319,8 @@ pub(crate) mod internal { signal: OutputSignal, _: private::Internal, ) { - handle_gpio_output!(&mut self.0, target, { - PeripheralOutputPin::disconnect_from_peripheral_output( - target, - signal, - private::Internal, - ) - }) + interconnect::OutputSignal::new(self.degrade_internal(private::Internal)) + .disconnect_from_peripheral_output(signal, private::Internal); } } diff --git a/examples/src/bin/embassy_i2c.rs b/examples/src/bin/embassy_i2c.rs index f9352e1fda5..604cac1c18a 100644 --- a/examples/src/bin/embassy_i2c.rs +++ b/examples/src/bin/embassy_i2c.rs @@ -6,7 +6,7 @@ //! This is an example of running the embassy executor with IC2. It uses an //! LIS3DH to get accelerometer data. //! -//! Folowing pins are used: +//! Following pins are used: //! - SDA => GPIO4 //! - SCL => GPIO5 diff --git a/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs b/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs index f1e5299f171..d725f2a7db4 100644 --- a/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs +++ b/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs @@ -3,7 +3,7 @@ //! This example dumps the calibration data from a BMP180 sensor by reading by reading //! with the direct I2C API and the embedded-hal-async I2C API. //! -//! Folowing pins are used: +//! Following pins are used: //! - SDA => GPIO4 //! - SCL => GPIO5 //! diff --git a/hil-test/tests/i2c.rs b/hil-test/tests/i2c.rs index e85e223241b..60ddb5d1b4e 100644 --- a/hil-test/tests/i2c.rs +++ b/hil-test/tests/i2c.rs @@ -1,6 +1,6 @@ //! I2C test //! -//! Folowing pins are used: +//! Following pins are used: //! SDA GPIO2 (esp32s2 and esp32s3) //! GPIO6 (esp32c6) //! GPIO18 (esp32c2) diff --git a/hil-test/tests/spi_full_duplex.rs b/hil-test/tests/spi_full_duplex.rs index 188b2724fb7..5c8bb35c7af 100644 --- a/hil-test/tests/spi_full_duplex.rs +++ b/hil-test/tests/spi_full_duplex.rs @@ -1,6 +1,6 @@ //! SPI Full Duplex Test //! -//! Folowing pins are used: +//! Following pins are used: //! SCLK GPIO0 //! MISO GPIO2 / GPIO9 (esp32s2 / esp32s3) / GPIO26 (esp32) //! MOSI GPIO3 / GPIO10 (esp32s2 / esp32s3) / GPIO27 (esp32) diff --git a/hil-test/tests/spi_full_duplex_dma.rs b/hil-test/tests/spi_full_duplex_dma.rs index 812f8b2e5e4..52a8997034e 100644 --- a/hil-test/tests/spi_full_duplex_dma.rs +++ b/hil-test/tests/spi_full_duplex_dma.rs @@ -1,6 +1,6 @@ //! SPI Full Duplex DMA ASYNC Test //! -//! Folowing pins are used: +//! Following pins are used: //! SCLK GPIO0 //! MISO GPIO2 / GPIO9 (esp32s2 / esp32s3) / GPIO26 (esp32) //! MOSI GPIO3 / GPIO10 (esp32s2 / esp32s3) / GPIO27 (esp32) diff --git a/hil-test/tests/spi_full_duplex_dma_pcnt.rs b/hil-test/tests/spi_full_duplex_dma_pcnt.rs index f245d81a3f9..71b80dfa4d4 100644 --- a/hil-test/tests/spi_full_duplex_dma_pcnt.rs +++ b/hil-test/tests/spi_full_duplex_dma_pcnt.rs @@ -1,6 +1,6 @@ //! SPI Full Duplex DMA ASYNC Test with PCNT readback. //! -//! Folowing pins are used: +//! Following pins are used: //! SCLK GPIO0 //! MOSI GPIO3 / GPIO10 (esp32s3) //! PCNT GPIO2 / GPIO9 (esp32s3) diff --git a/hil-test/tests/spi_half_duplex_read.rs b/hil-test/tests/spi_half_duplex_read.rs index dd43edb4cc4..905d9abe0c7 100644 --- a/hil-test/tests/spi_half_duplex_read.rs +++ b/hil-test/tests/spi_half_duplex_read.rs @@ -1,6 +1,6 @@ //! SPI Half Duplex Read Test //! -//! Folowing pins are used: +//! Following pins are used: //! SCLK GPIO0 //! MISO GPIO2 / GPIO9 (esp32s2 / esp32s3) / GPIO26 (esp32) //! diff --git a/hil-test/tests/twai.rs b/hil-test/tests/twai.rs index 4ca8c64ed5a..24a20bab9fb 100644 --- a/hil-test/tests/twai.rs +++ b/hil-test/tests/twai.rs @@ -1,6 +1,6 @@ //! TWAI test //! -//! Folowing pins are used: +//! Following pins are used: //! TX GPIO2 / GPIO9 (esp32s2 / esp32s3) / GPIO26 (esp32) //! RX GPIO3 / GPIO10 (esp32s2 / esp32s3) / GPIO27 (esp32) //! diff --git a/hil-test/tests/uart.rs b/hil-test/tests/uart.rs index 6fa2a28ffdb..6e273333ddc 100644 --- a/hil-test/tests/uart.rs +++ b/hil-test/tests/uart.rs @@ -1,6 +1,6 @@ //! UART Test //! -//! Folowing pins are used: +//! Following pins are used: //! TX GPIO2 / GPIO9 (esp32s2 / esp32s3) / GPIO26 (esp32) //! RX GPIO3 / GPIO10 (esp32s2 / esp32s3) / GPIO27 (esp32) //! diff --git a/hil-test/tests/uart_async.rs b/hil-test/tests/uart_async.rs index a98efad19d2..19d3c6fe56d 100644 --- a/hil-test/tests/uart_async.rs +++ b/hil-test/tests/uart_async.rs @@ -1,6 +1,6 @@ //! UART Test //! -//! Folowing pins are used: +//! Following pins are used: //! TX GPIO2 / GPIO9 (esp32s2 / esp32s3) / GPIO26 (esp32) //! RX GPIO3 / GPIO10 (esp32s2 / esp32s3) / GPIO27 (esp32) //! diff --git a/hil-test/tests/uart_tx_rx.rs b/hil-test/tests/uart_tx_rx.rs index 9d8fd5506f8..b474d2d81ed 100644 --- a/hil-test/tests/uart_tx_rx.rs +++ b/hil-test/tests/uart_tx_rx.rs @@ -1,6 +1,6 @@ //! UART TX/RX Test //! -//! Folowing pins are used: +//! Following pins are used: //! TX GPIO2 / GPIO9 (esp32s2 / esp32s3) / GPIO26 (esp32) //! RX GPIO3 / GPIO10 (esp32s2 / esp32s3) / GPIO27 (esp32) //! diff --git a/hil-test/tests/uart_tx_rx_async.rs b/hil-test/tests/uart_tx_rx_async.rs index 40e7af2805e..1aa10836b9c 100644 --- a/hil-test/tests/uart_tx_rx_async.rs +++ b/hil-test/tests/uart_tx_rx_async.rs @@ -1,6 +1,6 @@ //! UART TX/RX Async Test //! -//! Folowing pins are used: +//! Following pins are used: //! TX GPIO2 / GPIO9 (esp32s2 / esp32s3) / GPIO26 (esp32) //! RX GPIO3 / GPIO10 (esp32s2 / esp32s3) / GPIO27 (esp32) //!