Hello everyone,
I have found softwareexamples with SMPL_Init(sRxCallback) and SMPL_Init(0) and I'm wondering what the exact difference between both initialisations is.
Thanks in advance Rick
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello everyone,
I have found softwareexamples with SMPL_Init(sRxCallback) and SMPL_Init(0) and I'm wondering what the exact difference between both initialisations is.
Thanks in advance Rick
Thanks for your reply Martin.
In the simple peer to peer example is SMPL_Init(sRxCallback); in the LinkListen file.
And in the cascading end devices is SMPL_Init(0); in the main_babble file.
Thanks in advance
Hi Rick
In the simple peer to peer example the SRxCallback is a pointer to the call bakc function to be used when user application frame is received. For the cascading end devices example this is not used and therefoe a null pointer is set.
Br
Martin
The key purpose of providing the call back function pointer in the call to SMPL_Init is to allow the user application code access to ISR context management of packets being received on user ports. Every time a packet is received which is associated with a link ID, it is passed to this call back function in the ISR context. Depending on what the call back function does, the packet may be either discarded there or stored in the incoming queue for the associated link ID.
Bottom line, it supplies some flexibility in how the user may wish to manage packet handling at the application layer.
Jim Noxon