Changed to use stdint types.

This commit is contained in:
Piotr Esden-Tempski
2013-06-12 19:11:22 -07:00
parent 7df63fcae0
commit 34de1e776e
127 changed files with 1886 additions and 1895 deletions

View File

@@ -21,9 +21,9 @@
#include <libopencm3/sam/eefc.h>
/** Default peripheral clock frequency after reset. */
u32 pmc_mck_frequency = 4000000;
uint32_t pmc_mck_frequency = 4000000;
void pmc_xtal_enable(bool en, u8 startup_time)
void pmc_xtal_enable(bool en, uint8_t startup_time)
{
if (en) {
CKGR_MOR = (CKGR_MOR & ~CKGR_MOR_MOSCXTST_MASK) |
@@ -35,14 +35,14 @@ void pmc_xtal_enable(bool en, u8 startup_time)
}
}
void pmc_plla_config(u8 mul, u8 div)
void pmc_plla_config(uint8_t mul, uint8_t div)
{
CKGR_PLLAR = CKGR_PLLAR_ONE | ((mul - 1) << 16) |
CKGR_PLLAR_PLLACOUNT_MASK | div;
while (!(PMC_SR & PMC_SR_LOCKA));
}
void pmc_peripheral_clock_enable(u8 pid)
void pmc_peripheral_clock_enable(uint8_t pid)
{
if (pid < 32) {
PMC_PCER0 = 1 << pid;
@@ -51,7 +51,7 @@ void pmc_peripheral_clock_enable(u8 pid)
}
}
void pmc_peripheral_clock_disable(u8 pid)
void pmc_peripheral_clock_disable(uint8_t pid)
{
if (pid < 32) {
PMC_PCDR0 = 1 << pid;