Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Include Page
css.uC-TCP-IP Device Driver APIs.css
css.uC-TCP-IP Device Driver APIs.css
Include Page
css.webworks.css
css.webworks.css

Anchor
1114742
1114742
NetDev_ISR_Handler()

...

NetDev_

Anchor
1114743
1114743
A device’s ISR_Handler() is the device interrupt handler. In general, the device interrupt handler must perform the following functions:

...

a Post the address of the data area that has completed transmission to the transmit buffer de-allocation task by calling NetOS_IF_TxDeallocTaskPost() with the pointer to the data area that has completed transmission.

b Call NetOS_Dev_TxRdySignal() with the interface number that has just completed transmission.

...

External or CPU’s integrated interrupt controllers should be cleared from within the network device’s BSP-level ISR after NetDev_ISR_Handler() returns. Additionally, it is highly recommended that device driver ISR handlers be kept as short as possible to reduce the amount of interrupt latency in the system.

function is used to handle each device’s interrupts. See section 7-5-5 on page 164 for more details on how to handle each device’s interrupts.

Anchor
1114744
1114744
Files

Anchor
1111679
1111679
Every device driver’s net_dev.c

Anchor
1111685
1111685
Prototype

Anchor
1123356
1123356
 

HTML Table
summary
classCode_Listing
Table Row (tr)
Table Cell (td)
rowspan2

Anchor
1114661
1114661
static void NetDev_ISR_Handler (NET_IF *pif,

Anchor
1135954
1135954
NET_DEV_ISR_TYPE type);

Table Row (tr)

Anchor
1111686
1111686
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’.

Anchor
1111687
1111687
Arguments

Anchor
1111688
1111688
pif

Anchor
1132044
1132044
Pointer to the interface to handle network device interrupts.

Anchor
1111691
1111691
type

Anchor
1132046
1132046
Device’s interrupt type:

Anchor
1114702
1114702
NET_DEV_ISR_TYPE_UNKNOWN

Anchor
1135955
1135955
NET_DEV_ISR_TYPE_RX

Anchor
1135956
1135956
NET_DEV_ISR_TYPE_RX_RUNT

Anchor
1135957
1135957
NET_DEV_ISR_TYPE_RX_OVERRUN

Anchor
1135958
1135958
NET_DEV_ISR_TYPE_TX_RDY

Anchor
1135959
1135959
NET_DEV_ISR_TYPE_TX_COMPLETE

Anchor
1135960
1135960
NET_DEV_ISR_TYPE_TX_COLLISION_LATE

Anchor
1135961
1135961
NET_DEV_ISR_TYPE_TX_COLLISION_EXCESS

Anchor
1135962
1135962
NET_DEV_ISR_TYPE_JABBER

Anchor
1135963
1135963
NET_DEV_ISR_TYPE_BABBLE

Anchor
1135964
1135964
NET_DEV_ISR_TYPE_PHY

Anchor
1111692
1111692
Returned Value

Anchor
1111693
1111693
None.

Anchor
1111694
1111694
Required Configuration

Anchor
1111695
1111695
None.

Anchor
1111696
1111696
Notes / Warnings

Anchor
1111697
1111697
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. NetDev_ISR_Handler() should never return early.