Handle a network device’s interrupts on a specific interface.
Files
net_bsp.c
Prototype
Code Block |
---|
static void NetDev_ISR_Handler (void); |
Note that since NetDev_ISR_Handler()
is accessed only by function pointer usually via an interrupt vector table, it doesn’t need to be globally available and should therefore be declared as ‘static
’.
Arguments
None.
Returned Value
None.
Required Configuration
None.
Notes / Warnings
Each network device’s interrupt, or set of device interrupts, must be handled by a unique BSP-level interrupt service routine (ISR) handler, NetDev_ISR_Handler()
, which maps each specific device interrupt to its corresponding network interface ISR handler, NetIF_ISR_Handler()
. For some CPUs this may be a first- or second-level interrupt handler. Generally, the application must configure the interrupt controller to call every network device’s unique NetDev_ISR_Handler()
when the device’s interrupt occurs (see function NetDev_CfgIntCtrl). Every unique NetDev_ISR_Handler()
must then perform the following actions:
...
See also Network Board Support Package.
Examples
Code Block |
---|
static void NetDev_MACB_ISR_Handler_2 (void)
{
NET_ERR err;
NetIF_ISR_Handler(AT91SAM9263-EK_MACB_2_IF_Nbr, NET_DEV_ISR_TYPE_UNKNOWN, &err);
/* Clear external or CPU's integrated interrupt controller. */
}
static void NetDev_MACB_ISR_HandlerRx_2 (void)
{
NET_ERR err;
NetIF_ISR_Handler(AT91SAM9263-EK_MACB_2_IF_Nbr, NET_DEV_ISR_TYPE_RX, &err);
/* Clear external or CPU's integrated interrupt controller. */
} |