Skip to content

Commit 2138fd7

Browse files
authored
machine/samd51: Moving QSPI definitions to common file
The QSPI peripheral is only available on a fixed set of pins, so these can be added as constants for all atsamd51 boards.
1 parent 1d913a6 commit 2138fd7

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/machine/board_pybadge.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ const (
5555
TFT_LITE = PA01
5656

5757
SPEAKER_ENABLE = PA27
58-
59-
QSPI_SCK = PB10
60-
QSPI_CS = PB11
61-
QSPI_DATA_1 = PA08
62-
QSPI_DATA_2 = PA09
63-
QSPI_DATA_3 = PA10
64-
QSPI_DATA_4 = PA11
6558
)
6659

6760
const (

src/machine/machine_atsamd51.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,16 @@ func (spi SPI) Transfer(w byte) (byte, error) {
11951195
return byte(spi.Bus.DATA.Get()), nil
11961196
}
11971197

1198+
// The QSPI peripheral on ATSAMD51 is only available on the following pins
1199+
const (
1200+
QSPI_SCK = PB10
1201+
QSPI_CS = PB11
1202+
QSPI_DATA0 = PA08
1203+
QSPI_DATA1 = PA09
1204+
QSPI_DATA2 = PA10
1205+
QSPI_DATA3 = PA11
1206+
)
1207+
11981208
// PWM
11991209
const period = 0xFFFF
12001210

0 commit comments

Comments
 (0)