summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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) {
}