aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
Diffstat (limited to 'testhal')
-rw-r--r--testhal/AVR/MEGA/SPI/main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/testhal/AVR/MEGA/SPI/main.c b/testhal/AVR/MEGA/SPI/main.c
index 0cc3bcf5a..0d3708e52 100644
--- a/testhal/AVR/MEGA/SPI/main.c
+++ b/testhal/AVR/MEGA/SPI/main.c
@@ -41,12 +41,13 @@ void spiCallback(SPIDriver *spip) {
* @biref SPI configuration strucrture.
*/
static const SPIConfig spiCfg = {
- IOPORT2, /* SPI chip select port. */
- 7, /* SPI chip select pad. */
- SPI_CPOL0_CPHA0, /* SPI mode. */
- SPI_MSB_FIRST, /* SPI bit order. */
- SPI_SCK_FOSC_128, /* SPI clock. */
- spiCallback /* SPI callback. */
+ spiCallback, /* SPI callback. */
+ IOPORT2, /* SPI chip select port. */
+ 7, /* SPI chip select pad. */
+ SPI_CR_DORD_MSB_FIRST | /* SPI Data order. */
+ SPI_CR_CPOL_CPHA_MODE(0) | /* SPI clock polarity and phase. */
+ SPI_CR_SCK_FOSC_128, /* SPI clock. */
+ SPI_SR_SCK_FOSC_2 /* SPI double speed bit. */
};
/*