diff options
Diffstat (limited to 'include/arch/infineon-tc1796-mock/driver/gpio.h')
-rw-r--r-- | include/arch/infineon-tc1796-mock/driver/gpio.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/include/arch/infineon-tc1796-mock/driver/gpio.h b/include/arch/infineon-tc1796-mock/driver/gpio.h deleted file mode 100644 index 9ac43dd..0000000 --- a/include/arch/infineon-tc1796-mock/driver/gpio.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Daniel Friesel - * - * SPDX-License-Identifier: BSD-2-Clause - */ -#ifndef GPIO_H -#define GPIO_H - -class GPIO { - private: - GPIO(const GPIO ©); - - public: - GPIO () {} - - enum Pin : unsigned char { - PIN_INVALID - }; - - 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) { - } - inline void input(unsigned char const pin, unsigned char const pull) { - } - inline void output(unsigned char const pin) { - } - inline void output(unsigned char const pin, unsigned char const value) { - } - inline unsigned char read(unsigned char const pin) { - return 0; - } - inline void write(unsigned char const pin, unsigned char value) { - } - inline void write_mask(unsigned char const pin_base, unsigned char set_mask, unsigned char clear_mask) { - } -}; - -extern GPIO gpio; - -#endif |