Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor11147421114742 NetDev_ISR_Handler() Anchor11147431114743A device’s ISR_Handler() function is used to handle each device’s interrupts. See section 7-5-5 “NetDev_ISR_Handler()” on page 164 for more details on how to handle each device’s interrupts. Anchor11147441114744

Files

...

1111679Every device driver’s net_dev.c Anchor11116851111685

Prototype

...

static void
           *pif,
                                          NET_DEV_ISR_TYPE  type);
HTML Table
summary
classCode_Listing
Table Row (tr)
Table Cell (td)
rowspan2
Anchor
11146611114661
Code Block

          static void NetDev_ISR_Handler (NET_IF
*pif,
Anchor
11514961151496
Table Row (tr)

...



Note that since every device driver’s ISR_Handler() function is accessed only by function pointer via the device driver’s API structure, it doesn’t need to be globally available and should therefore be declared as ‘static’static. Anchor11116871111687

Arguments

...

11116881111688pif Anchor11320441132044

Pointer to the interface to handle network device interrupts.

Anchor11116911111691type Anchor11320461132046

Device’s interrupt type:

...

NET_DEV_ISR_TYPE_UNKNOWN

...

NET_DEV_ISR_TYPE_RX

...

NET_DEV_ISR_TYPE_RX_RUNT

...


...

NET_DEV_ISR_TYPE_RX_OVERRUN

...


NET_DEV_ISR_TYPE_TX_RDY

...


...

NET_DEV_ISR_TYPE_TX_COMPLETE

...

NET_DEV_ISR_TYPE_TX_COLLISION_LATE

...

NET_DEV_ISR_TYPE_TX_COLLISION_EXCESS

...

NET_DEV_ISR_TYPE_JABBER

...


NET_DEV_ISR_TYPE_BABBLE

...


...

NET_DEV_ISR_TYPE_PHY

...

Returned Value

...

11116931111693None. Anchor11116941111694

Required Configuration

...

11116951111695None. Anchor11116961111696

Notes / Warnings

...

Each device’s NetDev_ISR_Handler() should never return early but check all applicable interrupt sources to see if they are active. This additional checking is necessary because multiple interrupt sources may be set within the interrupt response time and will reduce the number and overhead of handling interrupts.