Moderators: odroid, meveric, mdrjr
I got 7.56Mhz for the speed
odroid wrote:use 8-bit 8080-like bus with GPIOs bit-bang.
union reg_bitfield {
unsigned int wvalue;
struct {
unsigned int unused0:1;
unsigned int bit7:1;
unsigned int bit6:1;
unsigned int bit4:1;
unsigned int bit5:1;
unsigned int bit2:1;
unsigned int unused1:1;
unsigned int bit3:1;
unsigned int bit1:1;
unsigned int bit0:1;
unsigned int unused2:9;
unsigned int wr:1;
unsigned int unused3:12;
} bits;
};
int tft_write_gpio8_wr(struct fbtft_par *par, void *buf, size_t len)
{
u8 data;
union reg_bitfield dbus;
dbus.wvalue = ioread32(par->regrd_gpiox);
while (len--) {
data = *(u8 *) buf;
dbus.bits.bit0 = (data & 0x01) ? 1 : 0;
dbus.bits.bit1 = (data & 0x02) ? 1 : 0;
dbus.bits.bit2 = (data & 0x04) ? 1 : 0;
dbus.bits.bit3 = (data & 0x08) ? 1 : 0;
dbus.bits.bit4 = (data & 0x10) ? 1 : 0;
dbus.bits.bit5 = (data & 0x20) ? 1 : 0;
dbus.bits.bit6 = (data & 0x40) ? 1 : 0;
dbus.bits.bit7 = (data & 0x80) ? 1 : 0;
/* Pulling down /WR */
dbus.bits.wr = 0;
iowrite32(dbus.wvalue, par->regwr_gpiox);
/* Pulling up /WR */
dbus.bits.wr = 1;
iowrite32(dbus.wvalue, par->regwr_gpiox);
buf++;
}
return 0;
}
odroid wrote:Backlit will be controlled by a PWM pin.
odroid wrote:The 3.5inch 480x320 LCD Shield has been released.
Users browsing this forum: No registered users and 2 guests