mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-13 19:43:44 +00:00
Compare commits
No commits in common. "f35be2984a907fa2099c87158deb2268396252ff" and "7444c44b48f7d60928956d05a0cbd0709135e883" have entirely different histories.
f35be2984a
...
7444c44b48
@ -613,7 +613,7 @@ static uint16_t XN297Dump_callback()
|
|||||||
address_length=4;
|
address_length=4;
|
||||||
memcpy(rx_tx_addr, (uint8_t *)"\xF4\x71\x8D\x01", address_length); // bind \x7E\xB8\x63\xA9
|
memcpy(rx_tx_addr, (uint8_t *)"\xF4\x71\x8D\x01", address_length); // bind \x7E\xB8\x63\xA9
|
||||||
bitrate=XN297DUMP_250K;
|
bitrate=XN297DUMP_250K;
|
||||||
packet_length=7;
|
packet_length=16;
|
||||||
hopping_frequency_no=0x50; //bind 0x50, normal ??
|
hopping_frequency_no=0x50; //bind 0x50, normal ??
|
||||||
|
|
||||||
NRF24L01_Initialize();
|
NRF24L01_Initialize();
|
||||||
@ -644,7 +644,6 @@ static uint16_t XN297Dump_callback()
|
|||||||
}
|
}
|
||||||
NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_PWR_UP) | _BV(NRF24L01_00_PRIM_RX)); //_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) |
|
NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_PWR_UP) | _BV(NRF24L01_00_PRIM_RX)); //_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) |
|
||||||
phase++;
|
phase++;
|
||||||
time=0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -652,16 +651,6 @@ static uint16_t XN297Dump_callback()
|
|||||||
{ // RX fifo data ready
|
{ // RX fifo data ready
|
||||||
if(NRF24L01_ReadReg(NRF24L01_09_CD))
|
if(NRF24L01_ReadReg(NRF24L01_09_CD))
|
||||||
{
|
{
|
||||||
XN297Dump_overflow();
|
|
||||||
uint16_t timeL=TCNT1;
|
|
||||||
if(TIMER2_BASE->SR & TIMER_SR_UIF)
|
|
||||||
{//timer just rolled over...
|
|
||||||
XN297Dump_overflow();
|
|
||||||
timeL=0;
|
|
||||||
}
|
|
||||||
time=(timeH<<16)+timeL-time;
|
|
||||||
debug("RX: %5luus ", time>>1);
|
|
||||||
time=(timeH<<16)+timeL;
|
|
||||||
NRF24L01_ReadPayload(packet, packet_length);
|
NRF24L01_ReadPayload(packet, packet_length);
|
||||||
//bool ok=true;
|
//bool ok=true;
|
||||||
uint8_t buffer[40];
|
uint8_t buffer[40];
|
||||||
@ -730,7 +719,6 @@ static uint16_t XN297Dump_callback()
|
|||||||
NRF24L01_FlushRx();
|
NRF24L01_FlushRx();
|
||||||
NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_PWR_UP) | _BV(NRF24L01_00_PRIM_RX)); // _BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) |
|
NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_PWR_UP) | _BV(NRF24L01_00_PRIM_RX)); // _BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) |
|
||||||
}
|
}
|
||||||
XN297Dump_overflow();
|
|
||||||
if(old_option != option)
|
if(old_option != option)
|
||||||
{
|
{
|
||||||
NRF24L01_WriteReg(NRF24L01_05_RF_CH, option); //hopping_frequency_no);
|
NRF24L01_WriteReg(NRF24L01_05_RF_CH, option); //hopping_frequency_no);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user