1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-07 00:04:36 +03:00

[sam] updating headers and getting the branch back to work

This commit is contained in:
Thibaut VIARD
2011-11-17 16:56:47 +01:00
parent 24fab0b41e
commit 7b5228310b
54 changed files with 1865 additions and 9179 deletions

View File

@@ -83,9 +83,9 @@ extern void PMC_EnablePeripheral( uint32_t dwId )
}
}
#elif (defined _SAM3N_) || (defined _SAM3U_)
if ( (PMC->PMC_PCSR & ((uint32_t)1 << dwId)) != ((uint32_t)1 << dwId) )
if ( (PMC->PMC_PCSR0 & ((uint32_t)1 << dwId)) != ((uint32_t)1 << dwId) )
{
PMC->PMC_PCER = 1 << dwId ;
PMC->PMC_PCER0 = 1 << dwId ;
}
#else
#error "The specified chip is not supported."
@@ -121,9 +121,9 @@ extern void PMC_DisablePeripheral( uint32_t dwId )
}
}
#elif (defined _SAM3N_) || (defined _SAM3U_)
if ( (PMC->PMC_PCSR & ((uint32_t)1 << dwId)) == ((uint32_t)1 << dwId) )
if ( (PMC->PMC_PCSR0 & ((uint32_t)1 << dwId)) == ((uint32_t)1 << dwId) )
{
PMC->PMC_PCDR = 1 << dwId ;
PMC->PMC_PCDR0 = 1 << dwId ;
}
#else
#error "The specified chip is not supported."
@@ -169,7 +169,7 @@ extern uint32_t PMC_IsPeripheralEnabled( uint32_t dwId )
}
}
#elif (defined _SAM3N_) || (defined _SAM3U_)
if ( (PMC->PMC_PCSR & ((uint32_t)1 << dwId)) )
if ( (PMC->PMC_PCSR0 & ((uint32_t)1 << dwId)) )
{
return 0 ;
}