From 7dac0cccc846d4452293b47b40d43f6b50ebcc33 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 23 Oct 2018 10:07:31 +0200 Subject: POSIX: Improve GPIO emulation --- src/arch/posix/driver/gpio.cc | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src/arch/posix/driver') diff --git a/src/arch/posix/driver/gpio.cc b/src/arch/posix/driver/gpio.cc index 25eed39..1403aed 100644 --- a/src/arch/posix/driver/gpio.cc +++ b/src/arch/posix/driver/gpio.cc @@ -1,31 +1,3 @@ #include "driver/gpio.h" -#include - -void GPIO::led_on(unsigned char id) -{ - if (id < 8) { - printf("▶ LED %3d on\n", id); - ledstate |= (1 << id); - } -} - -void GPIO::led_off(unsigned char id) -{ - if (id < 8) { - printf("▶ LED %3d off\n", id); - ledstate &= ~(1 << id); - } -} - -void GPIO::led_toggle(unsigned char id) -{ - if (id < 8) { - if (ledstate & (1 << id)) { - led_off(id); - } else { - led_on(id); - } - } -} GPIO gpio; -- cgit v1.2.3