linux/drivers/staging/fbtft/fbtft-bus.c

// SPDX-License-Identifier: GPL-2.0
#include <linux/export.h>
#include <linux/errno.h>
#include <linux/gpio/consumer.h>
#include <linux/spi/spi.h>
#include "fbtft.h"

/*****************************************************************************
 *
 *   void (*write_reg)(struct fbtft_par *par, int len, ...);
 *
 *****************************************************************************/

#define define_fbtft_write_reg(func, buffer_type, data_type, modifier)

define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )

void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
{}
EXPORT_SYMBOL();

/*****************************************************************************
 *
 *   int (*write_vmem)(struct fbtft_par *par);
 *
 *****************************************************************************/

/* 16 bit pixel over 8-bit databus */
int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
{}
EXPORT_SYMBOL();

/* 16 bit pixel over 9-bit SPI bus: dc + high byte, dc + low byte */
int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len)
{}
EXPORT_SYMBOL();

int fbtft_write_vmem8_bus8(struct fbtft_par *par, size_t offset, size_t len)
{}
EXPORT_SYMBOL();

/* 16 bit pixel over 16-bit databus */
int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len)
{}
EXPORT_SYMBOL();