From a01d6d8b31fa2882603432461b355ae829973c48 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 26 Dec 2023 21:13:43 +0700 Subject: [PATCH] tested other ports with featherwing max3421, change cs, intr pin to D10, D9 --- hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.h | 8 ++++++++ hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h | 2 +- hw/bsp/nrf/boards/feather_nrf52840_express/board.h | 4 ++-- hw/bsp/samd21/boards/feather_m0_express/board.h | 6 +++--- hw/bsp/samd51/boards/feather_m4_express/board.h | 6 +++--- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.h b/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.h index 1f8dc2cea..9aa2e7535 100644 --- a/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.h +++ b/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.h @@ -38,6 +38,14 @@ #define BUTTON_PIN 0 #define BUTTON_STATE_ACTIVE 0 +// SPI for USB host shield +#define MAX3421_SPI_HOST SPI2_HOST +#define MAX3421_SCK_PIN 36 +#define MAX3421_MOSI_PIN 35 +#define MAX3421_MISO_PIN 37 +#define MAX3421_CS_PIN 10 +#define MAX3421_INTR_PIN 9 + #ifdef __cplusplus } #endif diff --git a/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h b/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h index 44ff11aa0..137ea71ae 100644 --- a/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h +++ b/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h @@ -37,7 +37,7 @@ #define BUTTON_STATE_ACTIVE 0 // SPI for USB host shield -#define MAX3421_SPI_HOST SPI2_HOST +#define MAX3421_SPI_HOST SPI2_HOST #define MAX3421_SCK_PIN 36 #define MAX3421_MOSI_PIN 35 #define MAX3421_MISO_PIN 37 diff --git a/hw/bsp/nrf/boards/feather_nrf52840_express/board.h b/hw/bsp/nrf/boards/feather_nrf52840_express/board.h index 22946422b..3d59516d8 100644 --- a/hw/bsp/nrf/boards/feather_nrf52840_express/board.h +++ b/hw/bsp/nrf/boards/feather_nrf52840_express/board.h @@ -49,8 +49,8 @@ #define MAX3421_SCK_PIN 14 #define MAX3421_MOSI_PIN 13 #define MAX3421_MISO_PIN 15 -#define MAX3421_CS_PIN 6 // D11 -#define MAX3421_INTR_PIN 27 // D10 +#define MAX3421_CS_PIN 27 // D10 +#define MAX3421_INTR_PIN 26 // D9 #ifdef __cplusplus } diff --git a/hw/bsp/samd21/boards/feather_m0_express/board.h b/hw/bsp/samd21/boards/feather_m0_express/board.h index fd3d16aaa..56ae3230d 100644 --- a/hw/bsp/samd21/boards/feather_m0_express/board.h +++ b/hw/bsp/samd21/boards/feather_m0_express/board.h @@ -53,10 +53,10 @@ #define MAX3421_TX_PAD 1 // MOSI = PAD_2, SCK = PAD_3 #define MAX3421_RX_PAD 0 // MISO = PAD_2 -#define MAX3421_CS_PIN 16 // D11 +#define MAX3421_CS_PIN 18 // D10 -#define MAX3421_INTR_PIN 18 // D10 -#define MAX3421_INTR_EIC_ID 2 // EIC2 +#define MAX3421_INTR_PIN 7 // D10 +#define MAX3421_INTR_EIC_ID 7 // EIC7 #ifdef __cplusplus } diff --git a/hw/bsp/samd51/boards/feather_m4_express/board.h b/hw/bsp/samd51/boards/feather_m4_express/board.h index 474163c06..83de04266 100644 --- a/hw/bsp/samd51/boards/feather_m4_express/board.h +++ b/hw/bsp/samd51/boards/feather_m4_express/board.h @@ -55,10 +55,10 @@ #define MAX3421_TX_PAD 2 // MOSI = PAD_3, SCK = PAD_1 #define MAX3421_RX_PAD 2 // MISO = PAD_2 -#define MAX3421_CS_PIN 21 // D11 +#define MAX3421_CS_PIN 20 // D10 -#define MAX3421_INTR_PIN 20 // D10 -#define MAX3421_INTR_EIC_ID 4 // EIC4 +#define MAX3421_INTR_PIN 19 // D9 +#define MAX3421_INTR_EIC_ID 3 // EIC3 #ifdef __cplusplus }