mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-11-30 17:09:40 +00:00
DSM2 bind improvement?
This commit is contained in:
@@ -58,13 +58,15 @@ uint8_t CYRF_ReadRegister(uint8_t address)
|
||||
|
||||
uint8_t CYRF_Reset()
|
||||
{
|
||||
#ifdef CYRF_RST_HI
|
||||
CYRF_RST_HI; //Hardware reset
|
||||
delayMicroseconds(100);
|
||||
CYRF_RST_LO;
|
||||
delayMicroseconds(100);
|
||||
/* CYRF_WriteRegister(CYRF_1D_MODE_OVERRIDE, 0x01); //Software reset
|
||||
#endif
|
||||
CYRF_WriteRegister(CYRF_1D_MODE_OVERRIDE, 0x01); //Software reset
|
||||
delayMicroseconds(200);
|
||||
*/ CYRF_WriteRegister(CYRF_0C_XTAL_CTRL, 0xC0); //Enable XOUT as GPIO
|
||||
CYRF_WriteRegister(CYRF_0C_XTAL_CTRL, 0xC0); //Enable XOUT as GPIO
|
||||
CYRF_WriteRegister(CYRF_0D_IO_CFG, 0x04); //Enable PACTL as GPIO
|
||||
CYRF_SetTxRxMode(TXRX_OFF);
|
||||
//Verify the CYRF chip is responding
|
||||
@@ -231,7 +233,7 @@ void CYRF_FindBestChannels(uint8_t *channels, uint8_t len, uint8_t minspace, uin
|
||||
CYRF_ConfigCRCSeed(0x0000);
|
||||
CYRF_SetTxRxMode(RX_EN);
|
||||
//Wait for pre-amp to switch from send to receive
|
||||
delayMicroseconds(1000);
|
||||
delayMilliseconds(1);
|
||||
for(i = 0; i < NUM_FREQ; i++)
|
||||
{
|
||||
CYRF_ConfigRFChannel(i);
|
||||
|
||||
Reference in New Issue
Block a user