Skip to content

Commit

Permalink
Merge pull request thotro#196 from steffenmauch/patch-1
Browse files Browse the repository at this point in the history
Considering ESP8266 for fast SPI clock setting
  • Loading branch information
thotro authored May 17, 2017
2 parents d204b05 + d85e64b commit 49a2b4a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DW1000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ const byte DW1000Class::BIAS_900_16[] = {137, 122, 105, 88, 69, 47, 25, 0, 21, 4
const byte DW1000Class::BIAS_900_64[] = {147, 133, 117, 99, 75, 50, 29, 0, 24, 45, 63, 76, 87, 98, 116, 122, 132, 142};
*/
// SPI settings
const SPISettings DW1000Class::_fastSPI = SPISettings(16000000L, MSBFIRST, SPI_MODE0);
#ifndef ESP8266
const SPISettings DW1000Class::_fastSPI = SPISettings(16000000L, MSBFIRST, SPI_MODE0);
#else
// default ESP8266 frequency is 80 Mhz, thus divide by 4 is 20 MHz
const SPISettings DW1000Class::_fastSPI = SPISettings(20000000L, MSBFIRST, SPI_MODE0);
#endif
const SPISettings DW1000Class::_slowSPI = SPISettings(2000000L, MSBFIRST, SPI_MODE0);
const SPISettings* DW1000Class::_currentSPI = &_fastSPI;

Expand Down

0 comments on commit 49a2b4a

Please sign in to comment.