Use gpio_sys lib.

This commit is contained in:
Thomas Klaehn
2019-07-25 13:33:01 +02:00
parent 0ad0a5a1d9
commit 1c436eab6c
4 changed files with 19 additions and 15 deletions

View File

@@ -5,10 +5,10 @@
DEFINE_FFF_GLOBALS;
DECLARE_FAKE_VALUE_FUNC(int, gpio_open, const struct gpio *);
DECLARE_FAKE_VALUE_FUNC(int, gpio_close, const struct gpio *);
DECLARE_FAKE_VALUE_FUNC(int, gpio_read, const struct gpio *, unsigned int *);
DECLARE_FAKE_VALUE_FUNC(int, gpio_write, const struct gpio *, unsigned int);
DECLARE_FAKE_VALUE_FUNC(int, gpio_toggle, const struct gpio *);
DECLARE_FAKE_VALUE_FUNC(int, gpio_open, const struct gpio_sys *);
DECLARE_FAKE_VALUE_FUNC(int, gpio_close, const struct gpio_sys *);
DECLARE_FAKE_VALUE_FUNC(int, gpio_read, const struct gpio_sys *);
DECLARE_FAKE_VALUE_FUNC(int, gpio_write, const struct gpio_sys *, int);
DECLARE_FAKE_VALUE_FUNC(int, gpio_toggle, const struct gpio_sys *);
#endif

View File

@@ -2,8 +2,8 @@
DEFINE_FFF_GLOBALS;
DEFINE_FAKE_VALUE_FUNC(int, gpio_open, const struct gpio *);
DEFINE_FAKE_VALUE_FUNC(int, gpio_close, const struct gpio *);
DEFINE_FAKE_VALUE_FUNC(int, gpio_read, const struct gpio *, unsigned int *);
DEFINE_FAKE_VALUE_FUNC(int, gpio_write, const struct gpio *, unsigned int);
DEFINE_FAKE_VALUE_FUNC(int, gpio_toggle, const struct gpio *);
DEFINE_FAKE_VALUE_FUNC(int, gpio_open, const struct gpio_sys *);
DEFINE_FAKE_VALUE_FUNC(int, gpio_close, const struct gpio_sys *);
DEFINE_FAKE_VALUE_FUNC(int, gpio_read, const struct gpio_sys *);
DEFINE_FAKE_VALUE_FUNC(int, gpio_write, const struct gpio_sys *, int);
DEFINE_FAKE_VALUE_FUNC(int, gpio_toggle, const struct gpio_sys *);