src/isrDisp.c File Reference

#include "tll_common.h"
#include "isrDisp.h"
#include <tll_config.h>
#include <string.h>

Include dependency graph for isrDisp.c:


Functions

void isrDisp_isr ()
 Initialize isr dispatcher Parameters:.
int isrDisp_registerCallback (isrDisp_t *pThis, e_isr_t id, tFuncPtr pFunc, void *pArg)
 Register interrupt handler for ISR for DMA 3 Parameters:.
int isrDisp_unregisterCallback (isrDisp_t *pThis, e_isr_t id)
 isrDisp_unregisterCallback The function does parameter check and then unregisters the function.
unsigned long clz (unsigned long n)
int isrDisp_printIrqFreq (isrDisp_t *pThis)
 isrDisp_printIrqFreq prints number of occured interrupts for each registered IRQ

Variables

static isrDisp_tpisrDisp = NULL
 pointer to isrDisp
int sic_isr0_mask = 0
 copy of the mask of SIC ISR.
int sic_isr1_mask = 0
const char clz_table [32]

Function Documentation

unsigned long clz ( unsigned long  n  ) 

void isrDisp_isr (  ) 

Initialize isr dispatcher Parameters:.

Parameters:
pThis pointer to own object
Returns:
Zero on success. Negative value on failure.

Parametr check

Clear and initialize the dispatcher table

register default handlers for all the ISR

Assign the isrDisp to the global static variable so that it can be used in this file

Clear the ISR masks

int isrDisp_printIrqFreq ( isrDisp_t pThis  ) 

isrDisp_printIrqFreq prints number of occured interrupts for each registered IRQ

Parameters:

Returns:
None

int isrDisp_registerCallback ( isrDisp_t pThis,
e_isr_t  id,
tFuncPtr  pFunc,
void *  pArg 
)

Register interrupt handler for ISR for DMA 3 Parameters:.

Parameters:
pThis pointer to own object
pFunc pointer to function to call
pArg pointer to argument passed on call
Returns:
Zero on success. Negative value on failure.

Parameter Check

Parameter Check

Assign the new function pointer to the ISR Dispatcher

find out which isr mask has to be set to enable the interrupt

int isrDisp_unregisterCallback ( isrDisp_t pThis,
e_isr_t  id 
)

isrDisp_unregisterCallback The function does parameter check and then unregisters the function.

We ISR wont be able to interrupt the function again Parameters:

Returns:
None

Parameter Check

Find out whcih register has to be used to disable the interrupt

Unregister the function from the table


Variable Documentation

const char clz_table[32]

Initial value:

  {
    0, 31, 9, 30, 3, 8, 18, 29, 2, 5, 7, 14, 12, 17,
    22, 28, 1, 10, 4, 19, 6, 15, 13, 23, 11, 20, 16,
    24, 21, 25, 26, 27
  }

pisrDisp = NULL [static]

pointer to isrDisp

sic_isr0_mask = 0

copy of the mask of SIC ISR.

The SIC ISR is cleared by the device the relevant SIC_ISRx bit is not cleared unless the interrupt service routine clears the mechanism that generated interrupt

int sic_isr1_mask = 0


Generated on 3 Mar 2014 for PAL bare-c Library by  doxygen 1.4.7