From 6d8141c79876189f8b7ca7f40d6313086bc85c11 Mon Sep 17 00:00:00 2001 From: BCG Date: Wed, 5 Feb 2020 00:04:38 -0500 Subject: [PATCH 1/2] Added constants for QSPI pins --- src/machine/machine_atsamd51.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/machine/machine_atsamd51.go b/src/machine/machine_atsamd51.go index d61e9aa4ca..411e6793e8 100644 --- a/src/machine/machine_atsamd51.go +++ b/src/machine/machine_atsamd51.go @@ -1195,6 +1195,16 @@ func (spi SPI) Transfer(w byte) (byte, error) { return byte(spi.Bus.DATA.Get()), nil } +// The QSPI peripheral on ATSAMD51 is only available on the following pins +const ( + QSPI_SCK = PB10 + QSPI_CS = PB11 + QSPI_DATA0 = PA08 + QSPI_DATA1 = PA09 + QSPI_DATA2 = PA10 + QSPI_DATA3 = PA11 +) + // PWM const period = 0xFFFF From 9eb6f6c76f6fe89ad4e9976f943cc71ddceb3201 Mon Sep 17 00:00:00 2001 From: BCG Date: Wed, 5 Feb 2020 00:40:35 -0500 Subject: [PATCH 2/2] Moving QSPI definitions to common file for atsamd51 --- src/machine/board_pybadge.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/machine/board_pybadge.go b/src/machine/board_pybadge.go index 1d8c30f51b..2d7ab9ad95 100644 --- a/src/machine/board_pybadge.go +++ b/src/machine/board_pybadge.go @@ -55,13 +55,6 @@ const ( TFT_LITE = PA01 SPEAKER_ENABLE = PA27 - - QSPI_SCK = PB10 - QSPI_CS = PB11 - QSPI_DATA_1 = PA08 - QSPI_DATA_2 = PA09 - QSPI_DATA_3 = PA10 - QSPI_DATA_4 = PA11 ) const (