sam3 port: enable power on all PIO input ports by default.
authoraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 26 Oct 2010 18:03:49 +0000 (18:03 +0000)
committeraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 26 Oct 2010 18:03:49 +0000 (18:03 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4471 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/cortex-m3/drv/clock_sam3.c

index dfb2eb240ff812fdb20060a579063a7d08127864..6df204510d89584acdad75964659a868d06af24e 100644 (file)
 #include "clock_sam3.h"
 #include <cfg/compiler.h>
 #include <cfg/macros.h>
-#include <io/sam3_pmc.h>
-#include <io/sam3_sysctl.h>
-#include <io/sam3_flash.h>
-#include <io/sam3_wdt.h>
+#include <io/sam3.h>
 
 
 /* Frequency of board main oscillator */
@@ -134,4 +131,7 @@ void clock_init(void)
        PMC_MCKR = PMC_MCKR_CSS_PLL_CLK;
        timeout = CLOCK_TIMEOUT;
        while (!(PMC_SR & BV(PMC_SR_MCKRDY)) && --timeout);
+
+       /* Enable clock on PIO for inputs */
+       PMC_PCER = BV(PIOA_ID) | BV(PIOB_ID) | BV(PIOC_ID);
 }