test.c/inc/test_drv.h

21 lines
471 B
C
Raw Permalink Normal View History

2021-06-09 05:41:08 +00:00
#ifndef __TEST_DRV_H__
#define __TEST_DRV_H__
#include <stdlib.h>
#include "driver.h"
int tst_open(const struct driver *drv);
int tst_close(const struct driver *drv);
int tst_read(const struct driver *drv, char *buffer, unsigned int length);
int tst_write(const struct driver *drv, const char *buffer, unsigned int length);
static const struct driver_fp tst_fp = {
.open = tst_open,
.close = tst_close,
.read = tst_read,
.write = tst_write
};
#endif