Create a raspberry pi pico app that draws a blue square to an Adafruit TFT #292

Merged
savanni merged 7 commits from pico-st7789 into main 2025-02-27 14:58:31 +00:00
Showing only changes of commit f004aa3514 - Show all commits

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,