diff options
| author | Markus Mittendrein <git@maxmitti.at> | 2025-02-25 23:37:17 +0100 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.at> | 2025-02-25 23:39:45 +0100 |
| commit | 1b3d654c764b25cdd979acca0c956564cfe8358d (patch) | |
| tree | 25b08bca9fb82d4bc7b293d273dc095207e9d0d8 /device/MSP432P401R/gpio.cpp | |
| download | msp432_test-master.tar.gz msp432_test-master.zip | |
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; +} |
