File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -83,25 +83,25 @@ void arduino::ZephyrSPI::beginTransaction(SPISettings settings) {
8383 case SPI_MODE0:
8484 break ;
8585 case SPI_MODE1:
86- mode = SPI_MODE_CPHA;
86+ mode | = SPI_MODE_CPHA;
8787 break ;
8888 case SPI_MODE2:
89- mode = SPI_MODE_CPOL;
89+ mode | = SPI_MODE_CPOL;
9090 break ;
9191 case SPI_MODE3:
92- mode = SPI_MODE_CPOL | SPI_MODE_CPHA;
92+ mode | = SPI_MODE_CPOL | SPI_MODE_CPHA;
9393 break ;
9494 }
9595
9696 // Set SPI configuration structure for 8-bit transfers
9797 memset (&config, 0 , sizeof (struct spi_config ));
9898 config.operation = mode | SPI_WORD_SET (8 );
99- config.frequency = max (SPI_MIN_CLOCK_FEQUENCY , settings.getClockFreq ());
99+ config.frequency = max (SPI_MIN_CLOCK_FREQUENCY , settings.getClockFreq ());
100100
101101 // Set SPI configuration structure for 16-bit transfers
102102 memset (&config16, 0 , sizeof (struct spi_config ));
103103 config16.operation = mode | SPI_WORD_SET (16 );
104- config16.frequency = max (SPI_MIN_CLOCK_FEQUENCY , settings.getClockFreq ());
104+ config16.frequency = max (SPI_MIN_CLOCK_FREQUENCY , settings.getClockFreq ());
105105}
106106
107107void arduino::ZephyrSPI::endTransaction (void ) {
Original file line number Diff line number Diff line change 2626
2727// TODO:
2828// This depends on the clock settings, can't be used for all boards.
29- #ifndef SPI_MIN_CLOCK_FEQUENCY
30- #define SPI_MIN_CLOCK_FEQUENCY 1000000
29+ #ifndef SPI_MIN_CLOCK_FREQUENCY
30+ #define SPI_MIN_CLOCK_FREQUENCY 1000000
3131#endif
3232
3333/* Count the number of GPIOs for limit of number of interrupts */
You can’t perform that action at this time.
0 commit comments