diff options
Diffstat (limited to 'device/MSP432P401R/gpio.cpp')
| -rw-r--r-- | device/MSP432P401R/gpio.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/device/MSP432P401R/gpio.cpp b/device/MSP432P401R/gpio.cpp new file mode 100644 index 0000000..20911ed --- /dev/null +++ b/device/MSP432P401R/gpio.cpp @@ -0,0 +1,15 @@ +#include <gpio.hpp> + +#include <cstdint> + +#include <ti/devices/msp432p4xx/inc/msp432p401r.h> + +void setupOutputs() +{ + P2->DIR = 0b111; +} + +void writeOutputs(std::uint8_t val) +{ + P2->OUT = val % 8; +} |
