
#include <stdlib.h>
#include <stdio.h>
#include "interrupt.h"
#include "symbol.h"
#include "flib.h"

void fLib_DisableInt(UINT32 intNum)
{
    if (intNum>=32)
    {
        intNum-=32;
        MaskFIQ(intNum);
        fLib_FIQSources &= ~(1 << intNum);
    }
    else
    {
        MaskIRQ(intNum);
        fLib_IRQSources &= ~(1 << intNum);
    }
}

void fLib_EnableInt(UINT32 intNum)
{

    if (intNum>=32)
    {
        intNum-=32;
        fLib_FIQSources |= 1 << intNum;
        UnmaskFIQ(intNum);
        EnableFIQ();
    }
    else
    {
        fLib_IRQSources |= 1 << intNum;
        UnmaskIRQ(intNum);
        EnableIRQ();
    }
}
