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
+7
View File
@@ -18,6 +18,13 @@ var (
sercomI2CM3 = &I2C{Bus: sam.SERCOM3_I2CM, SERCOM: 3}
sercomI2CM4 = &I2C{Bus: sam.SERCOM4_I2CM, SERCOM: 4}
sercomI2CM5 = &I2C{Bus: sam.SERCOM5_I2CM, SERCOM: 5}
sercomSPIM0 = SPI{Bus: sam.SERCOM0_SPIM, SERCOM: 0}
sercomSPIM1 = SPI{Bus: sam.SERCOM1_SPIM, SERCOM: 1}
sercomSPIM2 = SPI{Bus: sam.SERCOM2_SPIM, SERCOM: 2}
sercomSPIM3 = SPI{Bus: sam.SERCOM3_SPIM, SERCOM: 3}
sercomSPIM4 = SPI{Bus: sam.SERCOM4_SPIM, SERCOM: 4}
sercomSPIM5 = SPI{Bus: sam.SERCOM5_SPIM, SERCOM: 5}
)
// This chip has three TCC peripherals, which have PWM as one feature.