From 75de9cb4c05005065c22d2e74d2f92019554cdca Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 20 Aug 2018 17:06:41 -0400 Subject: [PATCH] simulator: Add support for gpio_x_reset() Signed-off-by: Kevin O'Connor --- src/generic/gpio.h | 2 ++ src/simulator/gpio.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/generic/gpio.h b/src/generic/gpio.h index 11f2f394..cb104d00 100644 --- a/src/generic/gpio.h +++ b/src/generic/gpio.h @@ -7,6 +7,7 @@ struct gpio_out { uint8_t pin; }; struct gpio_out gpio_out_setup(uint8_t pin, uint8_t val); +void gpio_out_reset(struct gpio_out g, uint8_t val); void gpio_out_toggle_noirq(struct gpio_out g); void gpio_out_toggle(struct gpio_out g); void gpio_out_write(struct gpio_out g, uint8_t val); @@ -15,6 +16,7 @@ struct gpio_in { uint8_t pin; }; struct gpio_in gpio_in_setup(uint8_t pin, int8_t pull_up); +void gpio_in_reset(struct gpio_in g, int8_t pull_up); uint8_t gpio_in_read(struct gpio_in g); struct gpio_pwm { diff --git a/src/simulator/gpio.c b/src/simulator/gpio.c index 095fc384..f3058207 100644 --- a/src/simulator/gpio.c +++ b/src/simulator/gpio.c @@ -9,6 +9,8 @@ struct gpio_out gpio_out_setup(uint8_t pin, uint8_t val) { return (struct gpio_out){.pin=pin}; } +void gpio_out_reset(struct gpio_out g, uint8_t val) { +} void gpio_out_toggle_noirq(struct gpio_out g) { } void gpio_out_toggle(struct gpio_out g) { @@ -18,6 +20,8 @@ void gpio_out_write(struct gpio_out g, uint8_t val) { struct gpio_in gpio_in_setup(uint8_t pin, int8_t pull_up) { return (struct gpio_in){.pin=pin}; } +void gpio_in_reset(struct gpio_in g, int8_t pull_up) { +} uint8_t gpio_in_read(struct gpio_in g) { return 0; }