gpio_ftdi/test/inc/mock_ftdi.h

19 lines
735 B
C
Raw Normal View History

2019-07-16 14:40:42 +00:00
#ifndef __MOCK_FTDI_H__
#define __MOCK_FTDI_H__
#include <fff.h>
DEFINE_FFF_GLOBALS;
DECLARE_FAKE_VOID_FUNC(ftdi_free, struct ftdi_context *);
DECLARE_FAKE_VALUE_FUNC(int, ftdi_usb_open, struct ftdi_context *, int, int);
DECLARE_FAKE_VALUE_FUNC(int, ftdi_usb_close, struct ftdi_context *);
DECLARE_FAKE_VALUE_FUNC(struct ftdi_context *, ftdi_new);
DECLARE_FAKE_VALUE_FUNC(const char *, ftdi_get_error_string, struct ftdi_context *);
DECLARE_FAKE_VALUE_FUNC(int, ftdi_set_bitmode, struct ftdi_context *, unsigned char, unsigned char);
DECLARE_FAKE_VALUE_FUNC(int, ftdi_read_data, struct ftdi_context *, unsigned char *, int);
DECLARE_FAKE_VALUE_FUNC(int, ftdi_write_data, struct ftdi_context *, const unsigned char *, int);
#endif