Example #1
0
void GPIOPinIntEnable(unsigned int baseAdd,
                      unsigned int intLine,
                      unsigned int pinNumber)
{
    if(GPIO_INT_LINE_1 == intLine)
    {
        HWREG(baseAdd + GPIO_IRQSTATUS_SET(0)) = (1 << pinNumber);
    }
    else     
    {
        HWREG(baseAdd + GPIO_IRQSTATUS_SET(1)) = (1 << pinNumber);
    }
}
Example #2
0
static err_t gpio_disableIrq(Drive_Gpio *t)
{
	Drive_Gpio 		*cthis = ( Drive_Gpio *)t ;
	uint32_t		tmp_reg = 0;
#ifdef DEBUG_GPIO
	TRACE_INFO("Drive Piling :%s-%s-%d \r\n", __FILE__, __func__, __LINE__);
	return EXIT_SUCCESS;
#else
	tmp_reg = in32( cthis->gpio_vbase + GPIO_IRQSTATUS_SET( cthis->config->intr_line));
	tmp_reg &= ~( 1 << cthis->config->pin_number);
	out32(cthis->gpio_vbase + GPIO_IRQSTATUS_SET( cthis->config->intr_line), tmp_reg);
	return EXIT_SUCCESS;

#endif
}