sam: simplify SPI peripheral declaration

This has practically no effect on the resulting binaries, the only
difference I could find was for the flash/console/spi driver example.
I'm not sure how to test that one, but I think it's very unlikely that
code will have changed in any meaningful way (apart from reordering some
globals).
This commit is contained in:
Ayke van Laethem
2021-10-16 01:23:20 +02:00
committed by Ron Evans
parent ae864bdf0c
commit 497c74e4a9
41 changed files with 170 additions and 308 deletions
+2 -14
View File
@@ -2,8 +2,6 @@
package machine
import "device/sam"
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
@@ -111,12 +109,7 @@ const (
)
// SPI on the PyGamer.
var (
SPI0 = SPI{
Bus: sam.SERCOM1_SPIM,
SERCOM: 1,
}
)
var SPI0 = sercomSPIM1
// TFT SPI pins
const (
@@ -126,12 +119,7 @@ const (
)
// TFT SPI on the PyGamer.
var (
SPI1 = SPI{
Bus: sam.SERCOM4_SPIM,
SERCOM: 4,
}
)
var SPI1 = sercomSPIM4
// USB CDC identifiers
const (