From f0aa94c4265fb0d1b1038fdd356ec0c91723b13e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 18 Jul 2022 15:24:11 +0200 Subject: tc1796 mock: prepare for actual operation (LEDs are working!) --- include/arch/infineon-tc1796-mock/driver/gpio.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/arch') diff --git a/include/arch/infineon-tc1796-mock/driver/gpio.h b/include/arch/infineon-tc1796-mock/driver/gpio.h index 83689b6..9ac43dd 100644 --- a/include/arch/infineon-tc1796-mock/driver/gpio.h +++ b/include/arch/infineon-tc1796-mock/driver/gpio.h @@ -18,12 +18,18 @@ class GPIO { }; inline void setup() { + *((int*)0xf0000f10) = 0x80808080; + *((int*)0xf0000f14) = 0x80808080; + *((int*)0xf0000f00) = 0x000000ff; } inline void led_on(unsigned char id = 0) { + *((int*)0xf0000f00) &= ~(1 << id); } inline void led_off(unsigned char id = 0) { + *((int*)0xf0000f00) |= (1 << id); } inline void led_toggle(unsigned char id = 0) { + *((int*)0xf0000f00) ^= (1 << id); } inline void input(unsigned char const pin) { } -- cgit v1.2.3