Giter VIP home page Giter VIP logo

tftlcd-library's People

Contributors

buhosoft avatar driverblock avatar ladyada avatar paintyourdragon avatar samuraijap avatar tdicola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tftlcd-library's Issues

BMP / pushColors bracket on wrong line

Should be (note the commented line):

void Adafruit_TFTLCD::pushColors(uint16_t *data, uint8_t len, boolean first) {
uint16_t color;
uint8_t hi, lo;
CS_ACTIVE;
if(first == true) { // Issue GRAM write command only on first call
CD_COMMAND;
if(driver == ID_932X) write8(0x00);
if ((driver == ID_9341) || (driver == ID_HX8357D) || (driver == ID_ILI9327)){
write8(0x2C);
} else if (driver == ID_S6D0154){
write8(0x22);
} else {
write8(0x22);
}}
CD_DATA;
while(len--) {
color = *data++;
hi = color >> 8; // Don't simplify or merge these
lo = color; // lines, there's macro shenanigans
write8(hi); // going on.
write8(lo);
}
CS_IDLE;
//}
}

Due port/pin in Shield pin usage seems wrong

Due port/pin : PC23 PC24 PB27 PC26 PD7 PC29 PC21 PC22 -> did not worked for me. After referring the pin-out, I corrected the code to refer
Due port/pin : PC23 PC24 PC25 PC26 PC28 PB25 PC21 PC22

After making corresponding changes, it worked!!!

The revised code is

#define write8inline(d) { \

PIO_Set(PIOC, (((d) & 0x01)<<(22-0)) | (((d) & 0x02)<<(21-1)) | (((d) & 0x08)<<(28-3)) | (((d) & 0x10)<<(26-4)) | (((d) & 0x20)<<(25-5)) | (((d) & 0x40)<<(24-6)) | (((d) & 0x80)<<(23-7)) );
PIO_Clear(PIOC, (((~d) & 0x01)<<(22-0)) | (((~d) & 0x02)<<(21-1)) | (((~d) & 0x08)<<(28-3)) | (((~d) & 0x10)<<(26-4)) | (((~d) & 0x20)<<(25-5)) | (((~d) & 0x40)<<(24-6)) | (((~d) & 0x80)<<(23-7)) );
PIO_Set(PIOB, (((d) & 0x04)<<(25-2)));
PIO_Clear(PIOB, (((~d) & 0x04)<<(25-2)));
WR_STROBE; }

#define read8inline(result) { \

RD_ACTIVE;
delayMicroseconds(1);
result = (((PIOC->PIO_PDSR & (1<<23)) >> (23-7)) | ((PIOC->PIO_PDSR & (1<<24)) >> (24-6)) |
((PIOC->PIO_PDSR & (1<<25)) >> (25-5)) | ((PIOC->PIO_PDSR & (1<<26)) >> (26-4)) |
((PIOC->PIO_PDSR & (1<<28)) >> (28-3)) | ((PIOB->PIO_PDSR & (1<<25)) >> (25-2)) |
((PIOC->PIO_PDSR & (1<<21)) >> (21-1)) | ((PIOC->PIO_PDSR & (1<<22)) >> (22-0)));
RD_IDLE;}

#define setWriteDirInline() { \

PIOC->PIO_MDDR |= 0x17E00000; /PIOC->PIO_SODR = 0x17E00000;/ PIOC->PIO_OER |= 0x17E00000; PIOC->PIO_PER |= 0x17E00000;
PIOB->PIO_MDDR |= 0x02000000; /PIOB->PIO_SODR = 0x02000000;/ PIOB->PIO_OER |= 0x02000000; PIOB->PIO_PER |= 0x02000000; }

#define setReadDirInline() { \

pmc_enable_periph_clk( ID_PIOC ) ; pmc_enable_periph_clk( ID_PIOB ) ; pmc_enable_periph_clk( ID_PIOA ) ;
PIOC->PIO_PUDR |= 0x17E00000; PIOC->PIO_IFDR |= 0x17E00000; PIOC->PIO_ODR |= 0x17E00000; PIOC->PIO_PER |= 0x17E00000;
PIOB->PIO_PUDR |= 0x02000000; PIOB->PIO_IFDR |= 0x02000000; PIOB->PIO_ODR |= 0x02000000; PIOB->PIO_PER |= 0x02000000;
PIOA->PIO_PUDR |= 0x20000000; PIOA->PIO_IFDR |= 0x20000000; PIOA->PIO_ODR |= 0x20000000; PIOA->PIO_PER |= 0x20000000; } //C26 and A29 are shorted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.