mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-03-15 04:49:11 +00:00
Added NRF24L01_ReadPayloadLength
This commit is contained in:
parent
48258dd9dd
commit
8b67049863
@ -76,6 +76,16 @@ uint8_t NRF24L01_ReadReg(uint8_t reg)
|
|||||||
NRF_CSN_on;
|
NRF_CSN_on;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static uint8_t __attribute__((unused)) NRF24L01_ReadPayloadLength()
|
||||||
|
{
|
||||||
|
NRF_CSN_off;
|
||||||
|
SPI_Write(R_RX_PL_WID);
|
||||||
|
uint8_t len = SPI_Read();
|
||||||
|
NRF_CSN_on;
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
static void NRF24L01_ReadPayload(uint8_t * data, uint8_t length)
|
static void NRF24L01_ReadPayload(uint8_t * data, uint8_t length)
|
||||||
{
|
{
|
||||||
NRF_CSN_off;
|
NRF_CSN_off;
|
||||||
@ -221,6 +231,7 @@ uint8_t NRF24L01_packet_ack()
|
|||||||
return PKT_PENDING;
|
return PKT_PENDING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
// XN297 emulation layer
|
// XN297 emulation layer
|
||||||
uint8_t xn297_scramble_enabled=XN297_SCRAMBLED; //enabled by default
|
uint8_t xn297_scramble_enabled=XN297_SCRAMBLED; //enabled by default
|
||||||
|
@ -148,7 +148,7 @@ const PPM_Parameters PPM_prot[15]= {
|
|||||||
// Dial Protocol Sub protocol RX_Num Power Auto Bind Option
|
// Dial Protocol Sub protocol RX_Num Power Auto Bind Option
|
||||||
/* 1 */ {MODE_FLYSKY, Flysky , 0 , P_HIGH , NO_AUTOBIND , 0 },
|
/* 1 */ {MODE_FLYSKY, Flysky , 0 , P_HIGH , NO_AUTOBIND , 0 },
|
||||||
/* 2 */ {MODE_HUBSAN, 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
|
/* 2 */ {MODE_HUBSAN, 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
|
||||||
/* 3 */ {MODE_FRSKYD , 0 , 0 , P_HIGH , NO_AUTOBIND , 40 }, // option=fine freq tuning
|
/* 3 */ {MODE_FRSKYD, 0 , 0 , P_HIGH , NO_AUTOBIND , 40 }, // option=fine freq tuning
|
||||||
/* 4 */ {MODE_HISKY , Hisky , 0 , P_HIGH , NO_AUTOBIND , 0 },
|
/* 4 */ {MODE_HISKY , Hisky , 0 , P_HIGH , NO_AUTOBIND , 0 },
|
||||||
/* 5 */ {MODE_V2X2 , 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
|
/* 5 */ {MODE_V2X2 , 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
|
||||||
/* 6 */ {MODE_DSM , DSM2 , 0 , P_HIGH , NO_AUTOBIND , 2 }, // option=2=6 channels @ 22ms
|
/* 6 */ {MODE_DSM , DSM2 , 0 , P_HIGH , NO_AUTOBIND , 2 }, // option=2=6 channels @ 22ms
|
||||||
|
Loading…
x
Reference in New Issue
Block a user