Fix a bug that initialize setting of SPI clock value is not correct.

Modify the value as below.
 uint16_t mask = 0x000c0; ->
 uint16_t mask = 0x000c;
pull/762/head
Masao Hamanaka 2014-12-05 17:35:49 +09:00
parent dca273e167
commit a36c4462f2
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ void spi_frequency(spi_t *obj, int hz) {
spi_disable(obj);
const int P1CLK = 66666666; // 66.6666MHz
uint8_t div, brdv;
uint16_t mask = 0x000c0;
uint16_t mask = 0x000c;
if (hz <= P1CLK/2 && hz >= P1CLK/255) {
div = (P1CLK / hz / 2) -1;