浏览代码

Use 12 Mbit/sec for SPI_CLOCK_DIV2 on Teensy 3.x & LC

main
PaulStoffregen 9 年前
父节点
当前提交
d4d1c18995
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      SPI.h

+ 3
- 3
SPI.h 查看文件

@@ -546,7 +546,7 @@ public:
// beginTransaction() to configure SPI settings.
inline static void setClockDivider(uint8_t clockDiv) {
if (clockDiv == SPI_CLOCK_DIV2) {
setClockDivider_noInline(SPISettings(8000000, MSBFIRST, SPI_MODE0).ctar);
setClockDivider_noInline(SPISettings(12000000, MSBFIRST, SPI_MODE0).ctar);
} else if (clockDiv == SPI_CLOCK_DIV4) {
setClockDivider_noInline(SPISettings(4000000, MSBFIRST, SPI_MODE0).ctar);
} else if (clockDiv == SPI_CLOCK_DIV8) {
@@ -843,7 +843,7 @@ public:
// beginTransaction() to configure SPI settings.
inline static void setClockDivider(uint8_t clockDiv) {
if (clockDiv == SPI_CLOCK_DIV2) {
SPI0_BR = (SPISettings(8000000, MSBFIRST, SPI_MODE0).br0);
SPI0_BR = (SPISettings(12000000, MSBFIRST, SPI_MODE0).br0);
} else if (clockDiv == SPI_CLOCK_DIV4) {
SPI0_BR = (SPISettings(4000000, MSBFIRST, SPI_MODE0).br0);
} else if (clockDiv == SPI_CLOCK_DIV8) {
@@ -1015,7 +1015,7 @@ public:
// beginTransaction() to configure SPI settings.
inline static void setClockDivider(uint8_t clockDiv) {
if (clockDiv == SPI_CLOCK_DIV2) {
SPI1_BR = (SPISettings(8000000, MSBFIRST, SPI_MODE0).br1);
SPI1_BR = (SPISettings(12000000, MSBFIRST, SPI_MODE0).br1);
} else if (clockDiv == SPI_CLOCK_DIV4) {
SPI1_BR = (SPISettings(4000000, MSBFIRST, SPI_MODE0).br1);
} else if (clockDiv == SPI_CLOCK_DIV8) {

正在加载...
取消
保存