/* Get Periph Status for the given peripheral ID.  */
unsigned int PMC_IsPeriphEnabled(unsigned int id)
/* Get Periph Status for the given peripheral ID.  */
unsigned int PMC_IsPeriphEnabled(unsigned int id)
{
    if (id < 32) {
        return (PMC->PMC_PCSR0 & (1 << id));
    }
    else {
        return (PMC->PMC_PCSR1 & (1 << (id - 32)));
    }
}