@CHIP-RTOS C Library - TCP/IP API
Dev_Notify_ISR
Notify the TCP/IP stack from inside of a
RTX registered
Interrupt Service Routine that there is incoming data available
(and/or that the device has sent a frame successfully). int Dev_Notify_ISR( DevUserIfaceHandle DevHandlePtr,
unsigned int receivedPackets,
unsigned int sentPackets); Parameters
DevHandlePtr
- Device handle
receivedPackets
- Number of available received packets
sentPackets
- Number of sent packets completed (provisional)
Return Value
- 0: success
-1: See reported errorcode
.
Comments
- Go here for example
usage of this API for receiving data from a device.
This asynchronous call will release your receiver task from its wait at the
Dev_Recv_Wait() API, when the
receivedPackets parameter is non-zero. Your receiver task
can then go and handle these received packets. Note that
Dev_Recv_Wait()
will fall through once for each receivedPackets count
delivered by this API.
Assuming that your receiver task is constructed such that the
Dev_Recv_Interface() API
is called from within a while loop, as shown in the
myReceiveTask()
example, more efficient operation will result by always passing 1 for
the receivedPackets count here anytime there were
one or more packets available at your device receiver. This
will avoid unnecessary loops through your receiver task's outer loop.
The provisional sentPackets parameter passed to this API
should be set to zero for receiver events.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
On SC1x3/SC2x (RTOS version >=1.13, CLIB version >=2.10) there's
also a version of this function which uses dynamic linking instead of a
software interrupt, which reduces the function's overhead and thus
speeds up your application. This function's name is
Dev_Notify_ISR_Dyn. You should however not use this function
directly. Instead you should add the define TCPIP_DYN_LINK_DEV
to your program before including the CLIB's header file(s):
#define TCPIP_DYN_LINK_DEV
#include <clib.h>
This will map the original function's name to the dynamic linking
version. This way you can also easily switch existing programs to
dynamic linking.
Supported since or modified in @CHIP-RTOS version-
| SC12 | SC13 | SC11 | SC1x3 | SC2x |
-
| V1.10 | V1.00 | V1.00 | V0.90 | V1.00 |
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|