/* Set the De-bounce sampling cycle. 
The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. */
void GPIODebounceTimeSet(unsigned long ulClockSource, unsigned long ulDebounceClk)
/* Set the De-bounce sampling cycle. 
The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. */
void GPIODebounceTimeSet(unsigned long ulClockSource, unsigned long ulDebounceClk)
{
    xASSERT((ulClockSource == GPIO_DBCLKSRC_HCLK) ||
            (ulClockSource == GPIO_DBCLKSRC_10K));
    xASSERT(ulDebounceClk<=15);
    xHWREG(GPIO_PORTA_BASE + GPIO_DBNCECON) =  ((ulClockSource & 1) ?
                              (xHWREG(GPIO_PORTA_BASE + GPIO_DBNCECON) | GPIO_DBNCECON_DBCLKSRC) :
                              (xHWREG(GPIO_PORTA_BASE + GPIO_DBNCECON) & ~(GPIO_DBNCECON_DBCLKSRC)));
    xHWREG(GPIO_PORTA_BASE + GPIO_DBNCECON) &= ~GPIO_DBNCECON_DBCLKSEL_M;
    xHWREG(GPIO_PORTA_BASE + GPIO_DBNCECON) |= ulDebounceClk;
}