瀏覽代碼

T4 - Fix SPI.setCS

It was using the wrong field in the hardware table to change the pin mode for the CS pin. (was using SCK pins value)
main
Kurt Eckhardt 4 年之前
父節點
當前提交
ddeac2b666
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      SPI.cpp

+ 2
- 1
SPI.cpp 查看文件

@@ -1394,7 +1394,8 @@ uint8_t SPIClass::setCS(uint8_t pin)
{
for (unsigned int i = 0; i < sizeof(hardware().cs_pin); i++) {
if (pin == hardware().cs_pin[i]) {
*(portConfigRegister(pin)) = hardware().sck_mux[i];
*(portConfigRegister(pin)) = hardware().cs_mux[i];
hardware().pcs0_select_input_register = hardware().pcs0_select_val[i];
return 1;
}
}

Loading…
取消
儲存