/* Setup keypad interrupt. 
Enables or disables the related HW module interrupt, and attached the related sub-routine into the vector table. */
void kpp_setup_interrupt(bool state)
/* Setup keypad interrupt. 
Enables or disables the related HW module interrupt, and attached the related sub-routine into the vector table. */
void kpp_setup_interrupt(bool state)
{
    if (state)
    {
        kpp_clear_status();
        register_interrupt_routine(IMX_INT_KPP, &kpp_interrupt_routine);
        enable_interrupt(IMX_INT_KPP, CPU_0, 0);
    }
    else
    {
        disable_interrupt(IMX_INT_KPP, CPU_0);
        kpp_clear_status();
    }
}