narf52/include/st7789.h

31 lines
646 B
C
Raw Normal View History

2020-03-29 08:25:17 +00:00
#ifndef __ST7789_H__
#define __ST7789_H__
#include <stddef.h>
#include "driver.h"
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;
const struct driver *select;
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