summaryrefslogtreecommitdiff
path: root/include/arch
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-07-18 15:24:11 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2022-07-18 15:24:11 +0200
commitf0aa94c4265fb0d1b1038fdd356ec0c91723b13e (patch)
treecbeea68e0039db653931552fe31c29c6829e2dab /include/arch
parente6cef3c547e8f73cbf2d3c7ba639cb7d9934c475 (diff)
tc1796 mock: prepare for actual operation (LEDs are working!)
Diffstat (limited to 'include/arch')
-rw-r--r--include/arch/infineon-tc1796-mock/driver/gpio.h6
1 files changed, 6 insertions, 0 deletions
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) {
}