demo/include/st7789.h

33 lines
646 B
C
Raw Normal View History

2020-02-13 11:00:05 +00:00
#ifndef __ST7789_H__
#define __ST7789_H__
#include <stdarg.h>
#include "driver.h"
#define IOCTL_CMD_DRAW_IMAGE 0
int st7789_open(const struct driver *drv);
int st7789_close(const struct driver *drv);
int st7789_write(const struct driver *drv, const char *buffer, unsigned int len);
struct st7789 {
const struct driver *spi;
const struct driver *dc;
const struct driver *bl;
const struct driver *rst;
unsigned int height;
unsigned int width;
};
static const struct driver_fp st7789_fp = {
.open = st7789_open,
.close = st7789_close,
.read = NULL,
.write = st7789_write,
.ioctl = NULL,
};
#endif