diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-03-17 07:58:37 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-03-17 07:58:37 +0100 |
commit | ea1f28f59505579d90f0e51b1023c72f6fbb2ed8 (patch) | |
tree | 3125b23c93b3c4125225f4e5e58f9a989b352f0c | |
parent | 4d0bb251520c811db2bdb05aea981257cfc298b8 (diff) |
msp430fr5994: fix gpio definitions
-rw-r--r-- | include/arch/msp430fr5994lp/driver/gpio.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/arch/msp430fr5994lp/driver/gpio.h b/include/arch/msp430fr5994lp/driver/gpio.h index d972174..c3f1abf 100644 --- a/include/arch/msp430fr5994lp/driver/gpio.h +++ b/include/arch/msp430fr5994lp/driver/gpio.h @@ -123,21 +123,21 @@ class GPIO { P4OUT = pull ? (P4OUT | (1 << (pin - p4_0))) : (P4OUT & ~(1 << (pin - p4_0))); P4REN |= (1 << (pin - p4_0)); } else if (pin < p6_0) { - P5DIR &= ~(1 << (pin - pj_0)); + P5DIR &= ~(1 << (pin - p5_0)); P5OUT = pull ? (P5OUT | (1 << (pin - p5_0))) : (P5OUT & ~(1 << (pin - p5_0))); - P5REN |= (1 << (pin - pj_0)); + P5REN |= (1 << (pin - p5_0)); } else if (pin < p7_0) { - P6DIR &= ~(1 << (pin - p2_0)); + P6DIR &= ~(1 << (pin - p6_0)); P6OUT = pull ? (P6OUT | (1 << (pin - p6_0))) : (P6OUT & ~(1 << (pin - p6_0))); - P6REN |= (1 << (pin - p2_0)); + P6REN |= (1 << (pin - p6_0)); } else if (pin < p8_0) { - P7DIR &= ~(1 << (pin - p3_0)); + P7DIR &= ~(1 << (pin - p7_0)); P7OUT = pull ? (P7OUT | (1 << (pin - p7_0))) : (P7OUT & ~(1 << (pin - p7_0))); - P7REN |= (1 << (pin - p3_0)); + P7REN |= (1 << (pin - p7_0)); } else if (pin < pj_0) { - P8DIR &= ~(1 << (pin - p4_0)); + P8DIR &= ~(1 << (pin - p8_0)); P8OUT = pull ? (P8OUT | (1 << (pin - p8_0))) : (P8OUT & ~(1 << (pin - p8_0))); - P8REN |= (1 << (pin - p4_0)); + P8REN |= (1 << (pin - p8_0)); } else if (pin < PIN_INVALID) { PJDIR &= ~(1 << (pin - pj_0)); PJOUT = pull ? (PJOUT | (1 << (pin - pj_0))) : (PJOUT & ~(1 << (pin - pj_0))); |