Platform/ECM3532/DSP/hw/csp/ecm3532/nxp/src/int_controller.c
/*
Configure which edge triggers a hardware interrupt:
    - Address where the Interrupt Controller is mapped: p_intctrl.
    - Index of the hardware interrupt: interrupt_idx.
    - Triggering edge (rising or falling): edge.
*/
Configure which edge triggers a hardware interrupt:
Address where the Interrupt Controller is mapped: p_intctrl.
Index of the hardware interrupt: interrupt_idx.
Triggering edge (rising or falling): edge.
Configure which edge triggers a hardware interrupt : Address where the Interrupt Controller is mapped : p_intctrl . Index of the hardware interrupt : interrupt_idx . Triggering edge ( rising or falling ) : edge .
intctrl_err_T intctrl_setPolarity(p_hw_intctrl_reg_T p_intctrl, unsigned int interrupt_idx, intctrl_edge_T edge)
{
    bitmask_T int_bitmask = 1 << interrupt_idx;
    if (p_intctrl->enable & int_bitmask)
    {
        return INTCTRL_ENABLED_INT_ERR;
    }
    p_intctrl->polarity &= (~int_bitmask);
    p_intctrl->polarity |= (int_bitmask & (edge << interrupt_idx));
    return INTCTRL_SUCCESS;
}
intctrl_err_T intctrl_setPolarity ( p_hw_intctrl_reg_T p_intctrl , unsigned int interrupt_idx , intctrl_edge_T edge ) { bitmask_T int_bitmask = 1 << interrupt_idx ; if ( p_intctrl -> enable & int_bitmask ) { return INTCTRL_ENABLED_INT_ERR ; } p_intctrl -> polarity &= ( ~ int_bitmask ) ; p_intctrl -> polarity |= ( int_bitmask & ( edge << interrupt_idx ) ) ; return INTCTRL_SUCCESS ; }
Configure which edge triggers a hardware interrupt:
 Address where the Interrupt Controller is mapped: p_intctrl.
Configure which edge triggers a hardware interrupt : Address where the Interrupt Controller is mapped : p_intctrl .
/* clear the value */ /* set it to the new value */