Versions Compared

Key

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

This function is called by a device driver’s NetDev_Init() to configure a specific network device’s interrupts and/or interrupt controller on a specific interface.

Files

net_bsp.c

Prototype

Code Block
          static void NetDev_CfgIntCtrl (NET_IF  *p_if,
                                         NET_ERR *p_err);

Note that since NetDev_WiFi_CfgIntCtrl() is accessed only by function pointer via a BSP interface structure, it doesn’t need to be globally available and should therefore be declared as ‘static’.

...

See also section Network Board Support Package.

Examples

Code Block

          static  void  NetDev_WiFi_RS9110_CfgIntCtrl (NET_IF  *p_if,
                                                       NET_ERR *p_err)
          {
                                         /* Configure AT91SAM9263-EK RS9110 #2's specific IF number.       */
              AT91SAM9263-EK__WiFi_RS9110_2_IF_Nbr = pif->Nbr;
                                         /* Configure AT91SAM9263-EK RS9110 #2's interrupts:               */
                                         /* Configure interrupt vector.                                    */
              BSP_IntVectSet(BSP_INT, &NetDev_WiFi_RS9110_ISR_Handler_2);
              BSP_IntEn(BSP_INT);        /* Enable    interrupts.                                          */
           
             *p_err = NET_DEV_ERR_NONE;
          }
           
           
          static  void  NetDev_WiFi_RS9110_CfgIntCtrlRx_2 (NET_IF  *p_if,
                                                           NET_ERR *p_err)
          {
                                         /* Configure AT91SAM9263-EK RS9110 #2's specific IF number.       */
              AT91SAM9263-EK_WiFi_RS9110_2_IF_Nbr = pif->Nbr;
                                         /* Configure AT91SAM9263-EK RS9110 #2's receive interrupt:        */
                                         /* Configure interrupt vector.                                    */
              BSP_IntVectSet(BSP_INT_RX, &NetDev_WiFi_RS9100_ISR_HandlerRx_2);                     
              BSP_IntEn(BSP_INT_RX);     /* Enable    interrupt.                                           */
           
             *p_err = NET_DEV_ERR_NONE;
          }