Skip to content

Commit 1f87e79

Browse files
committed
Merge pull request #1781 from reiyawea/master
add CPOL setting
2 parents 00429e8 + 6630070 commit 1f87e79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/SPI/SPI.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ void SPIClass::setDataMode(uint8_t dataMode) {
102102
}
103103

104104
if(CPOL) {
105-
//todo How set CPOL???
105+
SPI1P |= 1<<29;
106+
} else {
107+
SPI1P &= ~(1<<29);
108+
//todo test whether it is correct to set CPOL like this.
106109
}
107110

108111
}

0 commit comments

Comments
 (0)