/*******************************************************************************
 * (c) Copyright 2009-2011 Actel Corporation.  All rights reserved.
 * 
 * CoreI2C driver interrupt control.
 * 
 * SVN $Revision: 3831 $
 * SVN $Date: 2011-09-25 08:19:53 +0530 (Sun, 25 Sep 2011) $
 */

#include "core_i2c.h"
#include "../CMSIS/a2fxxxm3.h"

/*------------------------------------------------------------------------------
 * This function must be modified to enable interrupts generated from the
 * CoreI2C instance identified as parameter.
 */
void I2C_enable_irq( i2c_instance_t * this_i2c )
{
    NVIC_ClearPendingIRQ( Fabric_IRQn );
    NVIC_EnableIRQ( Fabric_IRQn );
}

/*------------------------------------------------------------------------------
 * This function must be modified to disable interrupts generated from the
 * CoreI2C instance identified as parameter.
 */
void I2C_disable_irq( i2c_instance_t * this_i2c )
{
    NVIC_DisableIRQ( Fabric_IRQn );
}
