Open Korporal opened 2 years ago
I'm looking at your code and see that the read_register function seems to only work for commands that return single byte responses:
read_register
static uint8_t read_register(uint8_t reg) { uint8_t command = NRF24L01P_CMD_R_REGISTER | reg; uint8_t status; uint8_t read_val; cs_low(); HAL_SPI_TransmitReceive(NRF24L01P_SPI, &command, &status, 1, 2000); HAL_SPI_Receive(NRF24L01P_SPI, &read_val, 1, 2000); cs_high(); return read_val; }
If this were to support multibyte responses (like the 0A or 0B registers for example) how would you change that read_register function?
0A
0B
Is there any update regarding this issue?
I'm looking at your code and see that the
read_register
function seems to only work for commands that return single byte responses:If this were to support multibyte responses (like the
0A
or0B
registers for example) how would you change thatread_register
function?