diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-06-12 19:14:13 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-06-12 19:14:13 +0200 |
commit | 3db942d06cf22478041921bc570e6c9650b217d0 (patch) | |
tree | db37b21ed03fbf3fb26c0717aa432b966007b9b4 | |
parent | 2802594200a76a6a6765dd44bc908ec47b5872f3 (diff) |
Use RCC::enable().
-rw-r--r-- | main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -114,7 +114,9 @@ void xbee_send(int len, const uint8_t* buf) { } int main() { - RCC.APB2ENR |= 0x400d; + RCC.enable(RCC.AFIO); + RCC.enable(RCC.IOPA); + RCC.enable(RCC.IOPB); GPIOA.CRL = 0x44344444; GPIOA.CRH = 0x444444b4; @@ -126,7 +128,7 @@ int main() { while(cnt++ < (1 << 20)); // 100 kHz. - RCC.APB1ENR = (1 << 22); + RCC.enable(RCC.I2C2); while(cnt++ < (1 << 20)); I2C2.CR1 = 0x8000; @@ -142,6 +144,7 @@ int main() { uint8_t buf[6]; + RCC.enable(RCC.USART1); USART1.BRR = 7500; // 9600 baud USART1.CR1 = 0x2008; |