From 6719e1305921c08fcfba7e8f48e315ef8b676c6e Mon Sep 17 00:00:00 2001 From: 1-rafael-1 Date: Sun, 13 Apr 2025 22:23:07 +0200 Subject: update documentation and examples to mention RP235x --- examples/rp235x/src/bin/adc.rs | 4 ++-- examples/rp235x/src/bin/adc_dma.rs | 2 +- examples/rp235x/src/bin/blinky_wifi.rs | 4 ++-- examples/rp235x/src/bin/blinky_wifi_pico_plus_2.rs | 4 ++-- examples/rp235x/src/bin/gpio_async.rs | 2 +- examples/rp235x/src/bin/multicore.rs | 2 +- examples/rp235x/src/bin/pio_async.rs | 2 +- examples/rp235x/src/bin/pio_dma.rs | 2 +- examples/rp235x/src/bin/pio_hd44780.rs | 4 ++-- examples/rp235x/src/bin/pio_i2s.rs | 2 +- examples/rp235x/src/bin/pio_pwm.rs | 2 +- examples/rp235x/src/bin/pio_rotary_encoder.rs | 2 +- examples/rp235x/src/bin/pio_servo.rs | 2 +- examples/rp235x/src/bin/pio_stepper.rs | 2 +- examples/rp235x/src/bin/pio_uart.rs | 4 ++-- examples/rp235x/src/bin/pio_ws2812.rs | 2 +- examples/rp235x/src/bin/spi.rs | 2 +- examples/rp235x/src/bin/spi_async.rs | 2 +- examples/rp235x/src/bin/spi_display.rs | 2 +- examples/rp235x/src/bin/spi_sdmmc.rs | 2 +- examples/rp235x/src/bin/uart.rs | 2 +- examples/rp235x/src/bin/uart_buffered_split.rs | 2 +- examples/rp235x/src/bin/uart_unidir.rs | 2 +- examples/rp235x/src/bin/usb_webusb.rs | 2 +- examples/rp235x/src/bin/watchdog.rs | 2 +- examples/rp235x/src/bin/zerocopy.rs | 2 +- 26 files changed, 31 insertions(+), 31 deletions(-) (limited to 'examples') diff --git a/examples/rp235x/src/bin/adc.rs b/examples/rp235x/src/bin/adc.rs index b7324f755..b2a83e376 100644 --- a/examples/rp235x/src/bin/adc.rs +++ b/examples/rp235x/src/bin/adc.rs @@ -40,8 +40,8 @@ async fn main(_spawner: Spawner) { } fn convert_to_celsius(raw_temp: u16) -> f32 { - // According to chapter 4.9.5. Temperature Sensor in RP2040 datasheet - let temp = 27.0 - (raw_temp as f32 * 3.3 / 4096.0 - 0.706) / 0.001721; + // According to chapter 12.4.6 Temperature Sensor in RP235x datasheet + let temp = 27.0 - (raw_temp as f32 * 3.3 / 4096.0 - ..0.706) / 0.0..01721; let sign = if temp < 0.0 { -1.0 } else { 1.0 }; let rounded_temp_x10: i16 = ((temp * 10.0) + 0.5 * sign) as i16; (rounded_temp_x10 as f32) / 10.0 diff --git a/examples/rp235x/src/bin/adc_dma.rs b/examples/rp235x/src/bin/adc_dma.rs index b42c13fde..4003cc078 100644 --- a/examples/rp235x/src/bin/adc_dma.rs +++ b/examples/rp235x/src/bin/adc_dma.rs @@ -1,4 +1,4 @@ -//! This example shows how to use the RP2040 ADC with DMA, both single- and multichannel reads. +//! This example shows how to use the RP235x ADC with DMA, both single- and multichannel reads. //! For multichannel, the samples are interleaved in the buffer: //! `[ch1, ch2, ch3, ch4, ch1, ch2, ch3, ch4, ...]` #![no_std] diff --git a/examples/rp235x/src/bin/blinky_wifi.rs b/examples/rp235x/src/bin/blinky_wifi.rs index 7aeb38f1e..ef029867a 100644 --- a/examples/rp235x/src/bin/blinky_wifi.rs +++ b/examples/rp235x/src/bin/blinky_wifi.rs @@ -47,8 +47,8 @@ async fn main(spawner: Spawner) { // To make flashing faster for development, you may want to flash the firmwares independently // at hardcoded addresses, instead of baking them into the program with `include_bytes!`: - // probe-rs download ../../cyw43-firmware/43439A0.bin --binary-format bin --chip RP2040 --base-address 0x10100000 - // probe-rs download ../../cyw43-firmware/43439A0_clm.bin --binary-format bin --chip RP2040 --base-address 0x10140000 + // probe-rs download ../../cyw43-firmware/43439A0.bin --binary-format bin --chip RP235x --base-address 0x10100000 + // probe-rs download ../../cyw43-firmware/43439A0_clm.bin --binary-format bin --chip RP235x --base-address 0x10140000 //let fw = unsafe { core::slice::from_raw_parts(0x10100000 as *const u8, 230321) }; //let clm = unsafe { core::slice::from_raw_parts(0x10140000 as *const u8, 4752) }; diff --git a/examples/rp235x/src/bin/blinky_wifi_pico_plus_2.rs b/examples/rp235x/src/bin/blinky_wifi_pico_plus_2.rs index d49d2e34f..2a919a1ea 100644 --- a/examples/rp235x/src/bin/blinky_wifi_pico_plus_2.rs +++ b/examples/rp235x/src/bin/blinky_wifi_pico_plus_2.rs @@ -46,8 +46,8 @@ async fn main(spawner: Spawner) { // To make flashing faster for development, you may want to flash the firmwares independently // at hardcoded addresses, instead of baking them into the program with `include_bytes!`: - // probe-rs download ../../cyw43-firmware/43439A0.bin --binary-format bin --chip RP2040 --base-address 0x10100000 - // probe-rs download ../../cyw43-firmware/43439A0_clm.bin --binary-format bin --chip RP2040 --base-address 0x10140000 + // probe-rs download ../../cyw43-firmware/43439A0.bin --binary-format bin --chip RP235x --base-address 0x10100000 + // probe-rs download ../../cyw43-firmware/43439A0_clm.bin --binary-format bin --chip RP235x --base-address 0x10140000 //let fw = unsafe { core::slice::from_raw_parts(0x10100000 as *const u8, 230321) }; //let clm = unsafe { core::slice::from_raw_parts(0x10140000 as *const u8, 4752) }; diff --git a/examples/rp235x/src/bin/gpio_async.rs b/examples/rp235x/src/bin/gpio_async.rs index b79fb2a15..3be8569bc 100644 --- a/examples/rp235x/src/bin/gpio_async.rs +++ b/examples/rp235x/src/bin/gpio_async.rs @@ -1,4 +1,4 @@ -//! This example shows how async gpio can be used with a RP2040. +//! This example shows how async gpio can be used with a RP235x. //! //! The LED on the RP Pico W board is connected differently. See wifi_blinky.rs. diff --git a/examples/rp235x/src/bin/multicore.rs b/examples/rp235x/src/bin/multicore.rs index 7cb546c91..f02dc3876 100644 --- a/examples/rp235x/src/bin/multicore.rs +++ b/examples/rp235x/src/bin/multicore.rs @@ -1,4 +1,4 @@ -//! This example shows how to send messages between the two cores in the RP2040 chip. +//! This example shows how to send messages between the two cores in the RP235x chip. //! //! The LED on the RP Pico W board is connected differently. See wifi_blinky.rs. diff --git a/examples/rp235x/src/bin/pio_async.rs b/examples/rp235x/src/bin/pio_async.rs index baf567b58..a519b8a50 100644 --- a/examples/rp235x/src/bin/pio_async.rs +++ b/examples/rp235x/src/bin/pio_async.rs @@ -1,4 +1,4 @@ -//! This example shows powerful PIO module in the RP2040 chip. +//! This example shows powerful PIO module in the RP235x chip. #![no_std] #![no_main] diff --git a/examples/rp235x/src/bin/pio_dma.rs b/examples/rp235x/src/bin/pio_dma.rs index 64d603ba4..17332a238 100644 --- a/examples/rp235x/src/bin/pio_dma.rs +++ b/examples/rp235x/src/bin/pio_dma.rs @@ -1,4 +1,4 @@ -//! This example shows powerful PIO module in the RP2040 chip. +//! This example shows powerful PIO module in the RP235x chip. #![no_std] #![no_main] diff --git a/examples/rp235x/src/bin/pio_hd44780.rs b/examples/rp235x/src/bin/pio_hd44780.rs index 164e6f8d3..06d989505 100644 --- a/examples/rp235x/src/bin/pio_hd44780.rs +++ b/examples/rp235x/src/bin/pio_hd44780.rs @@ -1,4 +1,4 @@ -//! This example shows powerful PIO module in the RP2040 chip to communicate with a HD44780 display. +//! This example shows powerful PIO module in the RP235x chip to communicate with a HD44780 display. //! See (https://www.sparkfun.com/datasheets/LCD/HD44780.pdf) #![no_std] @@ -30,7 +30,7 @@ async fn main(_spawner: Spawner) { // db6 = PIN5 // db7 = PIN6 // additionally a pwm signal for a bias voltage charge pump is provided on pin 15, - // allowing direct connection of the display to the RP2040 without level shifters. + // allowing direct connection of the display to the RP235x without level shifters. let p = embassy_rp::init(Default::default()); let _pwm = Pwm::new_output_b(p.PWM_SLICE7, p.PIN_15, { diff --git a/examples/rp235x/src/bin/pio_i2s.rs b/examples/rp235x/src/bin/pio_i2s.rs index ae937a4ed..5a4bcfcac 100644 --- a/examples/rp235x/src/bin/pio_i2s.rs +++ b/examples/rp235x/src/bin/pio_i2s.rs @@ -1,5 +1,5 @@ //! This example shows generating audio and sending it to a connected i2s DAC using the PIO -//! module of the RP2040. +//! module of the RP235x. //! //! Connect the i2s DAC as follows: //! bclk : GPIO 18 diff --git a/examples/rp235x/src/bin/pio_pwm.rs b/examples/rp235x/src/bin/pio_pwm.rs index 7eabb2289..5712b5b91 100644 --- a/examples/rp235x/src/bin/pio_pwm.rs +++ b/examples/rp235x/src/bin/pio_pwm.rs @@ -1,4 +1,4 @@ -//! This example shows how to create a pwm using the PIO module in the RP2040 chip. +//! This example shows how to create a pwm using the PIO module in the RP235x chip. #![no_std] #![no_main] diff --git a/examples/rp235x/src/bin/pio_rotary_encoder.rs b/examples/rp235x/src/bin/pio_rotary_encoder.rs index 2750f61ae..e820d316d 100644 --- a/examples/rp235x/src/bin/pio_rotary_encoder.rs +++ b/examples/rp235x/src/bin/pio_rotary_encoder.rs @@ -1,4 +1,4 @@ -//! This example shows how to use the PIO module in the RP2040 to read a quadrature rotary encoder. +//! This example shows how to use the PIO module in the RP235x to read a quadrature rotary encoder. #![no_std] #![no_main] diff --git a/examples/rp235x/src/bin/pio_servo.rs b/examples/rp235x/src/bin/pio_servo.rs index c52ee7492..086b02f03 100644 --- a/examples/rp235x/src/bin/pio_servo.rs +++ b/examples/rp235x/src/bin/pio_servo.rs @@ -1,4 +1,4 @@ -//! This example shows how to create a pwm using the PIO module in the RP2040 chip. +//! This example shows how to create a pwm using the PIO module in the RP235x chip. #![no_std] #![no_main] diff --git a/examples/rp235x/src/bin/pio_stepper.rs b/examples/rp235x/src/bin/pio_stepper.rs index 3862c248b..931adbeda 100644 --- a/examples/rp235x/src/bin/pio_stepper.rs +++ b/examples/rp235x/src/bin/pio_stepper.rs @@ -1,4 +1,4 @@ -//! This example shows how to use the PIO module in the RP2040 to implement a stepper motor driver +//! This example shows how to use the PIO module in the RP235x to implement a stepper motor driver //! for a 5-wire stepper such as the 28BYJ-48. You can halt an ongoing rotation by dropping the future. #![no_std] diff --git a/examples/rp235x/src/bin/pio_uart.rs b/examples/rp235x/src/bin/pio_uart.rs index 9712984f9..d92e33feb 100644 --- a/examples/rp235x/src/bin/pio_uart.rs +++ b/examples/rp235x/src/bin/pio_uart.rs @@ -1,10 +1,10 @@ -//! This example shows how to use the PIO module in the RP2040 chip to implement a duplex UART. +//! This example shows how to use the PIO module in the RP235x chip to implement a duplex UART. //! The PIO module is a very powerful peripheral that can be used to implement many different //! protocols. It is a very flexible state machine that can be programmed to do almost anything. //! //! This example opens up a USB device that implements a CDC ACM serial port. It then uses the //! PIO module to implement a UART that is connected to the USB serial port. This allows you to -//! communicate with a device connected to the RP2040 over USB serial. +//! communicate with a device connected to the RP235x over USB serial. #![no_std] #![no_main] diff --git a/examples/rp235x/src/bin/pio_ws2812.rs b/examples/rp235x/src/bin/pio_ws2812.rs index d1fcfc471..42694c527 100644 --- a/examples/rp235x/src/bin/pio_ws2812.rs +++ b/examples/rp235x/src/bin/pio_ws2812.rs @@ -1,4 +1,4 @@ -//! This example shows powerful PIO module in the RP2040 chip to communicate with WS2812 LED modules. +//! This example shows powerful PIO module in the RP235x chip to communicate with WS2812 LED modules. //! See (https://www.sparkfun.com/categories/tags/ws2812) #![no_std] diff --git a/examples/rp235x/src/bin/spi.rs b/examples/rp235x/src/bin/spi.rs index 4cc4f5210..308f05c01 100644 --- a/examples/rp235x/src/bin/spi.rs +++ b/examples/rp235x/src/bin/spi.rs @@ -1,4 +1,4 @@ -//! This example shows how to use SPI (Serial Peripheral Interface) in the RP2040 chip. +//! This example shows how to use SPI (Serial Peripheral Interface) in the RP235x chip. //! //! Example for resistive touch sensor in Waveshare Pico-ResTouch diff --git a/examples/rp235x/src/bin/spi_async.rs b/examples/rp235x/src/bin/spi_async.rs index 266584efc..62bedc68a 100644 --- a/examples/rp235x/src/bin/spi_async.rs +++ b/examples/rp235x/src/bin/spi_async.rs @@ -1,4 +1,4 @@ -//! This example shows how to use SPI (Serial Peripheral Interface) in the RP2040 chip. +//! This example shows how to use SPI (Serial Peripheral Interface) in the RP235x chip. //! No specific hardware is specified in this example. If you connect pin 11 and 12 you should get the same data back. #![no_std] diff --git a/examples/rp235x/src/bin/spi_display.rs b/examples/rp235x/src/bin/spi_display.rs index 9c524ab25..9967abefd 100644 --- a/examples/rp235x/src/bin/spi_display.rs +++ b/examples/rp235x/src/bin/spi_display.rs @@ -95,7 +95,7 @@ async fn main(_spawner: Spawner) { let style = MonoTextStyle::new(&FONT_10X20, Rgb565::GREEN); Text::new( - "Hello embedded_graphics \n + embassy + RP2040!", + "Hello embedded_graphics \n + embassy + RP235x!", Point::new(20, 200), style, ) diff --git a/examples/rp235x/src/bin/spi_sdmmc.rs b/examples/rp235x/src/bin/spi_sdmmc.rs index 9808b6a5d..e14a62c31 100644 --- a/examples/rp235x/src/bin/spi_sdmmc.rs +++ b/examples/rp235x/src/bin/spi_sdmmc.rs @@ -1,4 +1,4 @@ -//! This example shows how to use `embedded-sdmmc` with the RP2040 chip, over SPI. +//! This example shows how to use `embedded-sdmmc` with the RP235x chip, over SPI. //! //! The example will attempt to read a file `MY_FILE.TXT` from the root directory //! of the SD card and print its contents. diff --git a/examples/rp235x/src/bin/uart.rs b/examples/rp235x/src/bin/uart.rs index a59f537bf..ed912b959 100644 --- a/examples/rp235x/src/bin/uart.rs +++ b/examples/rp235x/src/bin/uart.rs @@ -1,4 +1,4 @@ -//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP2040 chip. +//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP235x chip. //! //! No specific hardware is specified in this example. Only output on pin 0 is tested. //! The Raspberry Pi Debug Probe (https://www.raspberrypi.com/products/debug-probe/) could be used diff --git a/examples/rp235x/src/bin/uart_buffered_split.rs b/examples/rp235x/src/bin/uart_buffered_split.rs index da7e94139..f707c4b5e 100644 --- a/examples/rp235x/src/bin/uart_buffered_split.rs +++ b/examples/rp235x/src/bin/uart_buffered_split.rs @@ -1,4 +1,4 @@ -//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP2040 chip. +//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP235x chip. //! //! No specific hardware is specified in this example. If you connect pin 0 and 1 you should get the same data back. //! The Raspberry Pi Debug Probe (https://www.raspberrypi.com/products/debug-probe/) could be used diff --git a/examples/rp235x/src/bin/uart_unidir.rs b/examples/rp235x/src/bin/uart_unidir.rs index a45f40756..4e98f9e1e 100644 --- a/examples/rp235x/src/bin/uart_unidir.rs +++ b/examples/rp235x/src/bin/uart_unidir.rs @@ -1,4 +1,4 @@ -//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP2040 chip. +//! This example shows how to use UART (Universal asynchronous receiver-transmitter) in the RP235x chip. //! //! Test TX-only and RX-only on two different UARTs. You need to connect GPIO0 to GPIO5 for //! this to work diff --git a/examples/rp235x/src/bin/usb_webusb.rs b/examples/rp235x/src/bin/usb_webusb.rs index a5dc94d5b..75d28c853 100644 --- a/examples/rp235x/src/bin/usb_webusb.rs +++ b/examples/rp235x/src/bin/usb_webusb.rs @@ -1,4 +1,4 @@ -//! This example shows how to use USB (Universal Serial Bus) in the RP2040 chip. +//! This example shows how to use USB (Universal Serial Bus) in the RP235x chip. //! //! This creates a WebUSB capable device that echoes data back to the host. //! diff --git a/examples/rp235x/src/bin/watchdog.rs b/examples/rp235x/src/bin/watchdog.rs index b9d4ef22f..a54ec493a 100644 --- a/examples/rp235x/src/bin/watchdog.rs +++ b/examples/rp235x/src/bin/watchdog.rs @@ -1,4 +1,4 @@ -//! This example shows how to use Watchdog in the RP2040 chip. +//! This example shows how to use Watchdog in the RP235x chip. //! //! It does not work with the RP Pico W board. See wifi_blinky.rs or connect external LED and resistor. diff --git a/examples/rp235x/src/bin/zerocopy.rs b/examples/rp235x/src/bin/zerocopy.rs index d1fb0eb00..086c86cac 100644 --- a/examples/rp235x/src/bin/zerocopy.rs +++ b/examples/rp235x/src/bin/zerocopy.rs @@ -1,6 +1,6 @@ //! This example shows how to use `zerocopy_channel` from `embassy_sync` for //! sending large values between two tasks without copying. -//! The example also shows how to use the RP2040 ADC with DMA. +//! The example also shows how to use the RP235x ADC with DMA. #![no_std] #![no_main] -- cgit From bed6dde744d6e2f2e8af42dfc3a39d80d29d1ad2 Mon Sep 17 00:00:00 2001 From: rafael Date: Mon, 14 Apr 2025 09:23:32 +0200 Subject: Update adc.rs --- examples/rp235x/src/bin/adc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/rp235x/src/bin/adc.rs b/examples/rp235x/src/bin/adc.rs index b2a83e376..0a462bebd 100644 --- a/examples/rp235x/src/bin/adc.rs +++ b/examples/rp235x/src/bin/adc.rs @@ -1,4 +1,4 @@ -//! This example test the ADC (Analog to Digital Conversion) of the RP2350A pins 26, 27 and 28. +o//! This example test the ADC (Analog to Digital Conversion) of the RP2350A pins 26, 27 and 28. //! It also reads the temperature sensor in the chip. #![no_std] @@ -41,7 +41,7 @@ async fn main(_spawner: Spawner) { fn convert_to_celsius(raw_temp: u16) -> f32 { // According to chapter 12.4.6 Temperature Sensor in RP235x datasheet - let temp = 27.0 - (raw_temp as f32 * 3.3 / 4096.0 - ..0.706) / 0.0..01721; + let temp = 27.0 - (raw_temp as f32 * 3.3 / 4096.0 - 0.706) / 0.001721; let sign = if temp < 0.0 { -1.0 } else { 1.0 }; let rounded_temp_x10: i16 = ((temp * 10.0) + 0.5 * sign) as i16; (rounded_temp_x10 as f32) / 10.0 -- cgit From 4e90c535d24b4c575c2fc63556738ebc24ddab5f Mon Sep 17 00:00:00 2001 From: rafael Date: Mon, 14 Apr 2025 09:26:53 +0200 Subject: Update adc.rs --- examples/rp235x/src/bin/adc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/rp235x/src/bin/adc.rs b/examples/rp235x/src/bin/adc.rs index 0a462bebd..5c4135268 100644 --- a/examples/rp235x/src/bin/adc.rs +++ b/examples/rp235x/src/bin/adc.rs @@ -1,4 +1,4 @@ -o//! This example test the ADC (Analog to Digital Conversion) of the RP2350A pins 26, 27 and 28. +//! This example test the ADC (Analog to Digital Conversion) of the RP2350A pins 26, 27 and 28. //! It also reads the temperature sensor in the chip. #![no_std] -- cgit