From 7b5284023070b841293d0c5a6be0c6c345372cde Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 4 Dec 2017 15:19:25 +0100 Subject: Add basic system: LED GPIO on MSP430FR5969 Launchpad and faked GPIO on POSIX --- include/posix/driver/gpio.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/posix/driver/gpio.h (limited to 'include/posix') diff --git a/include/posix/driver/gpio.h b/include/posix/driver/gpio.h new file mode 100644 index 0000000..0995729 --- /dev/null +++ b/include/posix/driver/gpio.h @@ -0,0 +1,19 @@ +#ifndef GPIO_H +#define GPIO_H + +class GPIO { + private: + GPIO(const GPIO ©); + unsigned char ledstate; + + public: + GPIO () : ledstate(0) {} + void setup() {} + void led_on(unsigned char id); + void led_off(unsigned char id); + void led_toggle(unsigned char id); +}; + +extern GPIO gpio; + +#endif -- cgit v1.2.3