Platform/ECM3532/DSP/hw/csp/ecm3532/nxp/src/int_controller.c
/* 
Mapping a hardware interrupt to a CoolFlux interrupt line:
    - Address where the Interrupt Controller is mapped: p_intctrl.
    - Index of the hardware interrupt line: interrupt_idx.
    - CoolFlux interrupt line: interrupt_line.
*/
Mapping a hardware interrupt to a CoolFlux interrupt line:
Address where the Interrupt Controller is mapped: p_intctrl.
Index of the hardware interrupt line: interrupt_idx.
Mapping a hardware interrupt to a CoolFlux interrupt line : Address where the Interrupt Controller is mapped : p_intctrl . Index of the hardware interrupt line : interrupt_idx .
intctrl_err_T intctrl_associateInterruptLine(p_hw_intctrl_reg_T p_intctrl, unsigned int interrupt_idx, intline_T interrupt_line)
{
    unsigned int word[2];
    if (p_intctrl->enable & (1 << interrupt_idx))
    {
        return INTCTRL_ENABLED_INT_ERR;
    }
    word[0] = (interrupt_line & 0x01) << interrupt_idx;
    word[1] = ((interrupt_line >> 1) & 0x01) << interrupt_idx;
    p_intctrl->select[0] |= word[0];
    p_intctrl->select[1] |= word[1];
    return INTCTRL_SUCCESS;
}
intctrl_err_T intctrl_associateInterruptLine ( p_hw_intctrl_reg_T p_intctrl , unsigned int interrupt_idx , intline_T interrupt_line ) { unsigned int word [ 2 ] ; if ( p_intctrl -> enable & ( 1 << interrupt_idx ) ) { return INTCTRL_ENABLED_INT_ERR ; } word [ 0 ] = ( interrupt_line & 0x01 ) << interrupt_idx ; word [ 1 ] = ( ( interrupt_line >> 1 ) & 0x01 ) << interrupt_idx ; p_intctrl -> select [ 0 ] |= word [ 0 ] ; p_intctrl -> select [ 1 ] |= word [ 1 ] ; return INTCTRL_SUCCESS ; }
Mapping a hardware interrupt to a CoolFlux interrupt line:
 Address where the Interrupt Controller is mapped: p_intctrl.
Mapping a hardware interrupt to a CoolFlux interrupt line : Address where the Interrupt Controller is mapped : p_intctrl .
/* Get LSB and store it in word[0] */ /* Get next bit and store it in word[1] */