diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-12-04 12:06:35 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-12-04 12:06:35 +0100 |
commit | 030e5cdd712f6d7ed527743c8c54c5ced86d75b1 (patch) | |
tree | e79d0bb4f6dedd5273ddb6a231bc34a67c2c2e98 | |
parent | f6329360c398450bd82b874f86cf682031d23cae (diff) |
Fixed some typos in pin.h.
-rw-r--r-- | hal/pin.h | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -36,10 +36,10 @@ class Pin { } void set_af(int af) { - if(n > 8) { + if(n < 8) { g.AFRL = (g.AFRL & ~(0xf << (n * 4))) | af << (n * 4); } else { - g.AFRH = (g.AFRL & ~(0xf << (n * 4 - 32))) | af << (n * 4 - 32); + g.AFRH = (g.AFRH & ~(0xf << (n * 4 - 32))) | af << (n * 4 - 32); } } @@ -59,16 +59,16 @@ class Pin { } } }; -static Pin PB0(GPIOD, 0); -static Pin PB1(GPIOD, 1); -static Pin PB2(GPIOD, 2); -static Pin PB3(GPIOD, 3); -static Pin PB4(GPIOD, 4); -static Pin PB5(GPIOD, 5); -static Pin PB6(GPIOD, 6); -static Pin PB7(GPIOD, 7); -static Pin PB8(GPIOD, 8); -static Pin PB9(GPIOD, 9); +static Pin PB0(GPIOB, 0); +static Pin PB1(GPIOB, 1); +static Pin PB2(GPIOB, 2); +static Pin PB3(GPIOB, 3); +static Pin PB4(GPIOB, 4); +static Pin PB5(GPIOB, 5); +static Pin PB6(GPIOB, 6); +static Pin PB7(GPIOB, 7); +static Pin PB8(GPIOB, 8); +static Pin PB9(GPIOB, 9); static Pin PD12(GPIOD, 12); static Pin PD13(GPIOD, 13); |