DataFlash: fixed a semaphore bug in APM1 dataflash code
This commit is contained in:
parent
8cf4cbf611
commit
44285cfbad
@ -166,9 +166,10 @@ uint16_t DataFlash_APM1::PageSize()
|
||||
if (!_spi_sem->take(5))
|
||||
return 0;
|
||||
|
||||
return(528-((ReadStatusReg()&0x01) << 4)); // if first bit 1 trhen 512 else 528 bytes
|
||||
uint16_t ret = 528-((ReadStatusReg()&0x01) << 4); // if first bit 1 trhen 512 else 528 bytes
|
||||
|
||||
_spi_sem->give();
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Wait until DataFlash is in ready state...
|
||||
|
Loading…
Reference in New Issue
Block a user