hello weewStack,
greetings of the day.
In the nrf24_drive.c , some of the functions you wrote are by default selecting the SPI1.
for example:
char nrf_cmd_rd(unsigned short spi, char register_add)
{
char nrf_spi_rd;
spi_cs(1,LOW); // spi instead of 1 here
spi_rx(1,(register_add & nrf_read));
nrf_spi_rd= spi_rx(1,(register_add & nrf_read)); //spi instead of 1 here
spi_cs(1,HIGH);
return nrf_spi_rd;
}
when we call this function by enabling SPI2.