Hi,
Thank you so much for your help!
First of all I will be using the attached libraries for nrf24L01P.
I did setup the port configuration for CE, CSN and IRQ:
//defines for uC pins CE pin is connected to
//This is used so that the routines can send TX payload data and
// properly initialize the nrf24l01 in TX and RX states.
//Change these definitions (and then recompile) to suit your particular application.
#define nrf24l01_CE_IOREGISTER PORTB
#define nrf24l01_CE_PINMASK 0x14
//defines for uC pins CSN pin is connected to
//This is used so that the routines can send properly operate the SPI interface
// on the nrf24l01.
//Change these definitions (and then recompile) to suit your particular application.
#define nrf24l01_CSN_IOREGISTER PORTD
#define nrf24l01_CSN_PINMASK 0x04
//defines for uC pins IRQ pin is connected to
//This is used so that the routines can poll for IRQ or create an ISR.
//Change these definitions (and then recompile) to suit your particular application.
#define nrf24l01_IRQ_IOREGISTER PORTC
#define nrf24l01_IRQ_PINMASK 0x12
I guess I will setup the configuration for MISO, MOSI and SCK in the SPI file.
The part of the file nrf24l01.h I am concerned about right now is the following:
/////////////////////////////////////////////////////////////////////////////////
// SPI function requirements
//
// The user must define a function to send one byte of data and also return the
// resulting byte of data data through the SPI port. The function used here
// has the function prototype
//
// unsigned char spi_send_read_byte(unsigned char byte);
//
// This function should take the argument unsigned char byte and send it through
// the SPI port to the 24L01. Then, it should wait until the 24L01 has returned
// its response over SPI. This received byte should be the return value of the
// function.
//
// You should also change the include file name below to whatever the name of your
// SPI include file is.
//////////////////////////////////////////////////////////////////////////////////
//#include "spi1.h"
#define spi_send_read_byte(byte) spi1_send_read_byte(byte)
So you would suggest to create a new SPI library and not change some code in the SDK-file and use it instead ?
Thanks again!