/* Enables the clock of a peripheral. The peripheral ID (AT91C_ID_xxx) is used to identify which peripheral is targetted. Note that the ID must NOT be shifted (i.e. 1 << AT91C_ID_xxx).  */
void PMC_EnablePeripheral(unsigned int id)
/* Enables the clock of a peripheral. The peripheral ID (AT91C_ID_xxx) is used to identify which peripheral is targetted. Note that the ID must NOT be shifted (i.e. 1 << AT91C_ID_xxx).  */
void PMC_EnablePeripheral(unsigned int id)
{
    SANITY_CHECK(id < 32);
    if ((AT91C_BASE_PMC->PMC_PCSR & (1 << id)) == (1 << id)) {
        TRACE_INFO("PMC_EnablePeripheral: clock of peripheral"
                   " %u is already enabled\n\r",
                   id);
    }
    else {
        AT91C_BASE_PMC->PMC_PCER = 1 << id;
    }
}