mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Fixed detection of CC2500 with SPI transactions enabled.
This commit is contained in:
parent
816819d3d9
commit
a639511b23
1 changed files with 3 additions and 0 deletions
|
@ -103,8 +103,11 @@ void cc2500TxDisable(void)
|
|||
|
||||
static bool cc2500SpiDetect(void)
|
||||
{
|
||||
cc2500Reset(); // Reset the chip and give it time to wake up
|
||||
|
||||
const uint8_t chipPartNum = cc2500ReadReg(CC2500_30_PARTNUM | CC2500_READ_BURST); //CC2500 read registers chip part num
|
||||
const uint8_t chipVersion = cc2500ReadReg(CC2500_31_VERSION | CC2500_READ_BURST); //CC2500 read registers chip version
|
||||
|
||||
if (chipPartNum == 0x80 && chipVersion == 0x03) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue