From e0d04d1288bd983656cb8f82d80a7cfb8fe17f72 Mon Sep 17 00:00:00 2001 From: simon-77 <30923077+simon-77@users.noreply.github.com> Date: Tue, 30 Apr 2024 08:24:53 +0200 Subject: [PATCH] Add note about hardware peripheral SPI & how to enable spi1 hardware. --- examples/pico_CMake_setup/MyProject.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/pico_CMake_setup/MyProject.cpp b/examples/pico_CMake_setup/MyProject.cpp index 521d7b9..e34772c 100644 --- a/examples/pico_CMake_setup/MyProject.cpp +++ b/examples/pico_CMake_setup/MyProject.cpp @@ -12,7 +12,8 @@ #include #include "pico/stdlib.h" -// Pin definitions for OLED +// Pin definitions for OLED display +// NOTE: SCK & MOSI pins must be one of the hardware peripheral SPI pins #define OLED_RST 3 #define OLED_DC 2 #define OLED_CS 5 @@ -20,6 +21,9 @@ #define OLED_MOSI 19 #define SPI_FREQ 0 // 0 means default frequency +// spi0 is used by default, to use spi1 uncomment the following line: +//#define PICO_USE_SPI1 + // Include lcdgfx and use like for Arduino #include "lcdgfx.h" DisplaySSD1306_128x64_SPI oled(OLED_RST, {-1, OLED_CS, OLED_DC, SPI_FREQ, OLED_SCK, OLED_MOSI});