X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Fser_sam3.c;h=c330ca80acc382b9c335c82c782e4658166dbe27;hb=563795df4180aaceb7d69306551230c98fbca879;hp=8c2f764ecbda7097466a3fb6e5083c4919aec9d4;hpb=3c19a25efb0e397dff784a40ae94c47858a58eff;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/ser_sam3.c b/bertos/cpu/cortex-m3/drv/ser_sam3.c index 8c2f764e..c330ca80 100644 --- a/bertos/cpu/cortex-m3/drv/ser_sam3.c +++ b/bertos/cpu/cortex-m3/drv/ser_sam3.c @@ -338,7 +338,7 @@ static void uart0_init( UNUSED_ARG(struct Serial *, ser)) { US0_IDR = 0xFFFFFFFF; - PMC_PCER = BV(US0_ID); + pmc_periphEnable(US0_ID); /* * - Reset USART0 @@ -431,7 +431,7 @@ static void uart1_init( UNUSED_ARG(struct Serial *, ser)) { US1_IDR = 0xFFFFFFFF; - PMC_PCER = BV(US1_ID); + pmc_periphEnable(US1_ID); /* * - Reset USART1 @@ -547,7 +547,7 @@ static void spi0_init(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(struc //sysirq_setPriority(INT_SPI0, SERIRQ_PRIORITY); sysirq_setHandler(INT_SPI0, spi0_irq_handler); - PMC_PCER = BV(SPI0_ID); + pmc_periphEnable(SPI0_ID); /* Enable SPI */ SPI0_CR = BV(SPI_SPIEN); @@ -625,7 +625,7 @@ static void spi1_init(UNUSED_ARG(struct SerialHardware *, _hw), UNUSED_ARG(struc sysirq_setPriority(INT_SPI1, SERIRQ_PRIORITY); sysirq_setHandler(INT_SPI1, spi1_irq_dispatcher); - PMC_PCER = BV(SPI1_ID); + pmc_periphEnable(SPI1_ID); /* Enable SPI */ SPI1_CR = BV(SPI_SPIEN);