Test: switch to gpio_sys.

This commit is contained in:
Thomas Klaehn
2019-07-29 12:34:19 +02:00
parent d018e6e6b2
commit f5d62bd9f6
6 changed files with 12 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
#ifndef __MOCK_FTDI_H__
#define __MOCK_FTDI_H__
#ifndef __MOCK_GPIO_H__
#define __MOCK_GPIO_H__
#include <fff.h>
@@ -7,8 +7,8 @@ DEFINE_FFF_GLOBALS;
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_direction, struct gpio_sys *, int);
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

@@ -4,7 +4,7 @@
#include <sys/syscall.h>
#include <utest.h>
#include <mock_ftdi.h>
#include <mock_gpio.h>
#include <i2c_bb.h>

View File

@@ -4,7 +4,7 @@
#include <sys/syscall.h>
#include <utest.h>
#include <mock_ftdi.h>
#include <mock_gpio.h>
#include <i2c_bb.h>

View File

@@ -1,9 +1,9 @@
#include <mock_ftdi.h>
#include <mock_gpio.h>
DEFINE_FFF_GLOBALS;
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_direction, struct gpio_sys *, int);
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 *);