Skip to content

Commit

Permalink
Actually change the wireless pins
Browse files Browse the repository at this point in the history
  • Loading branch information
ZodiusInfuser committed Dec 9, 2024
1 parent 287825f commit d8d9075
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/micropython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ jobs:
working-directory: micropython
run: git apply "${{env.FIRMWARE_DIR}}/yukon_expander.patch"

- name: "HACK: Yukon Wireless Patch"
if: matrix.shortname == 'yukon_w'
shell: bash
working-directory: micropython/lib/pico-sdk
run: git apply "${{env.FIRMWARE_DIR}}/yukon_wireless.patch"

- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
Expand Down
36 changes: 36 additions & 0 deletions firmware/yukon_wireless.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff --git a/src/rp2_common/pico_cyw43_driver/cyw43_bus_pio_spi.c b/src/rp2_common/pico_cyw43_driver/cyw43_bus_pio_spi.c
index 5afe85e..c22084c 100644
--- a/src/rp2_common/pico_cyw43_driver/cyw43_bus_pio_spi.c
+++ b/src/rp2_common/pico_cyw43_driver/cyw43_bus_pio_spi.c
@@ -20,22 +20,23 @@
#include "cyw43_debug_pins.h"

#if CYW43_SPI_PIO
-#define WL_REG_ON 23
-#define DATA_OUT_PIN 24u
-#define DATA_IN_PIN 24u
-#define IRQ_PIN 24u
+#define WL_REG_ON 16u /*23*/
+#define DATA_OUT_PIN 19u /*24u*/
+#define DATA_IN_PIN 19u /*24u*/
+#define IRQ_PIN 19u /*24u*/
// #define MONITOR_PIN 3u
-#define CLOCK_PIN 29u
-#define CS_PIN 25u
+#define CLOCK_PIN 18u /*29u*/
+#define CS_PIN 17u /*25u*/
#define IRQ_SAMPLE_DELAY_NS 100

-#define SPI_PROGRAM_NAME spi_gap01_sample0
+//#define SPI_PROGRAM_NAME spi_gap01_sample0
+#define SPI_PROGRAM_NAME spi_gap0_sample1 // for lower cpu speed
#define SPI_PROGRAM_FUNC __CONCAT(SPI_PROGRAM_NAME, _program)
#define SPI_PROGRAM_GET_DEFAULT_CONFIG_FUNC __CONCAT(SPI_PROGRAM_NAME, _program_get_default_config)
#define SPI_OFFSET_END __CONCAT(SPI_PROGRAM_NAME, _offset_end)
#define SPI_OFFSET_LP1_END __CONCAT(SPI_PROGRAM_NAME, _offset_lp1_end)

-#define CLOCK_DIV 2
+#define CLOCK_DIV 8
#define CLOCK_DIV_MINOR 0
#define PADS_DRIVE_STRENGTH PADS_BANK0_GPIO0_DRIVE_VALUE_12MA

0 comments on commit d8d9075

Please sign in to comment.