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.
This commit is contained in:
BCG
2020-02-05 11:45:33 -05:00
committed by GitHub
parent 1d913a62bc
commit 2138fd7854
2 changed files with 10 additions and 7 deletions
-7
View File
@@ -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 (
+10
View File
@@ -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