Use the onboard LED and try to transmit at 2MB

This commit is contained in:
Savanni D'Gerinel 2025-02-27 00:18:32 -05:00
parent 54dd004915
commit f004aa3514

View File

@ -179,7 +179,7 @@ unsafe fn main() -> ! {
// An abstraction for a timer which we can use to delay the code.
let mut timer = Timer::new(peripherals.TIMER, &mut peripherals.RESETS, &clocks);
let mut led = pins.gpio16.into_function();
let mut led = pins.led.into_function();
// Grab the clock and data pins for SPI1. For Clock pins and for Data pins, there are only two
// pins each on the Pico which can function for SPI1.
@ -201,7 +201,7 @@ unsafe fn main() -> ! {
// The SPI system uses the peripheral clock
clocks.peripheral_clock.freq(),
// Transmit data at a rate of 1Mbit.
32_u32.MHz(),
2_u32.MHz(),
// Run with SPI Mode 1. This means that the clock line should start high and that data will
// be sampled starting at the first falling edge.
embedded_hal::spi::MODE_3,