stm32
stm32 copied to clipboard
nRF24_ReadPayload for Dynamic Payload
In function nRF24_ReadPayload:
*length = nRF24_ReadReg(nRF24_REG_RX_PW_P0 + pipe);
It works only for fixed size payload.
I suggest replacing with:
*length = nRF24_ReadReg(CMD_R_RX_PL_WID);
This will work for both fixed size and dynamic.