mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 03:03:27 +00:00
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:
@@ -55,13 +55,6 @@ const (
|
|||||||
TFT_LITE = PA01
|
TFT_LITE = PA01
|
||||||
|
|
||||||
SPEAKER_ENABLE = PA27
|
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 (
|
const (
|
||||||
|
|||||||
@@ -1195,6 +1195,16 @@ func (spi SPI) Transfer(w byte) (byte, error) {
|
|||||||
return byte(spi.Bus.DATA.Get()), nil
|
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
|
// PWM
|
||||||
const period = 0xFFFF
|
const period = 0xFFFF
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user