mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-12 09:47:54 +00:00
Revert "adds SX1276_DetectChip()"
This reverts commit a3d0955a928d53d59191e4a6d200f2d5f3c90a9c.
This commit is contained in:
parent
a3d0955a92
commit
7e578cd128
@ -42,41 +42,6 @@ uint8_t SX1276_Reset()
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool SX1276_DetectChip() //to be called after reset, verfies the chip has been detected
|
||||
{
|
||||
#define MaxAttempts 5
|
||||
uint8_t i = 0;
|
||||
bool chipFound = false;
|
||||
while ((i < MaxAttempts) && !chipFound)
|
||||
{
|
||||
uint8_t ChipVersion = SX1276_ReadReg(0x42);
|
||||
if (ChipVersion == 0x12)
|
||||
{
|
||||
debugln("SX1276 reg version=%d", ChipVersion);
|
||||
chipFound = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("SX1276 not found! attempts: ");
|
||||
debug(i + 1);
|
||||
debug(" of ");
|
||||
debug(MaxAttempts);
|
||||
debugln(" SX1276 reg version=%d", ChipVersion);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (!chipFound)
|
||||
{
|
||||
debugln("SX1276 not detected!!!");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
debugln("Found SX1276 Device!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void SX1276_SetTxRxMode(uint8_t mode)
|
||||
{
|
||||
#ifdef SX1276_TXEN_pin
|
||||
@ -233,4 +198,4 @@ void SX1276_WritePayloadToFifo(uint8_t* payload, uint8_t length)
|
||||
SX1276_WriteRegisterMulti(SX1276_00_FIFO, payload, length);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user