Include Page |
---|
| css.uC-TCP-IP Wireless Device Driver APIs.css |
---|
| css.uC-TCP-IP Wireless Device Driver APIs.css |
---|
|
Include Page |
---|
| css.webworks.css |
---|
| css.webworks.css |
---|
|
Anchor |
---|
| 110807611147421108076 |
---|
| 1114742 |
---|
|
NetDev_ISR_Handler()
Handle a network device’s interrupts on a specific interface A 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.
Anchor |
---|
| 110836411147441108364 |
---|
| 1114744 |
---|
|
Files
Anchor |
---|
| 110836511116791108365 |
---|
| 1111679 |
---|
|
Every device driver’s net_
bspdev.c
Anchor |
---|
| 110833211116851108332 |
---|
| 1111685 |
---|
|
Prototype
Anchor |
---|
| 112355711233561123557 |
---|
| 1123356 |
---|
|
HTML Table |
---|
|
Table Row (tr) |
---|
Table Cell (td) |
---|
| Anchor |
---|
| 110832911146611108329 |
---|
| 1114661 |
---|
| static void NetDev_ISR_Handler (voidNET_IF *pif, NET_DEV_ISR_TYPE type); |
|
|
Anchor |
---|
| 110833311116861108333 |
---|
| 1111686 |
---|
|
Note that since
NetDev_every device driver’s ISR_Handler()
function is accessed only by function pointer
usually via an interrupt vector tablevia the device driver’s API structure, it doesn’t need to be globally available and should therefore be declared as ‘static’.
Anchor |
---|
| 110827711116871108277 |
---|
| 1111687 |
---|
|
Arguments
Anchor |
---|
| 110839511116881108395 |
---|
| 1111688 |
---|
|
None. pif Returned Value Anchor |
---|
1108309 | 1108309 | None Pointer to the interface to handle network device interrupts.
Anchor |
---|
| 110831011116911108310 |
---|
| 1111691 |
---|
|
Required Configuration type None. Device’s interrupt type: Notes / Warnings NET_DEV_ISR_TYPE_UNKNOWN Anchor |
---|
1119487 | 1119487 | In most cases, each device requires only a single NetDev_ISR_Handler() which calls NetIF_ISR_Handler() with interrupt type code 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 section A-3-3 on page 340). Every unique NetDev_ISR_Handler() must then perform the following actions:...
NET_DEV_ISR_TYPE_RX NET_DEV_ISR_TYPE_RX_RUNT NET_DEV_ISR_TYPE_
UNKNOWN. This is possible when the device’s driver can determine the device’s interrupt type to via internal device registers or the interrupt controller. However, some devices cannot generically determine the interrupt type when an interrupt occurs and may therefore require multiple, unique NetDev_ISR_Handler()’s each of which calls NetIF_ISR_Handler() with the appropriate interrupt type code. Anchor |
---|
1119501 | 1119501 | Ethernet Physical layer (Phy) interrupts should call NetIF_ISR_Handler() with interrupt type code RX_OVERRUN NET_DEV_ISR_TYPE_
PHY.TX_RDY See also section C-9-12 “NetIF_ISR_Handler()” on page 519. 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...
...
...
None.
...
...
...
Required Configuration
...
...
...
None.
...
...
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.