We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many SPI LCDs have a D/C (data/command) pin, and expect command + data pairs of bytes. It'd make a massive amount of sense to allow:
SPI.send([...],cs_pin,dc_pin)
where the 9th bit of the supplied data was the value of the DC pin for that byte.
The text was updated successfully, but these errors were encountered:
It might make more sense to include it in SPI.setup instead.
SPI.setup
Code for the ILI9341 could then look like:
SPI.setup({ ... nbit9 : dc }); var LCD = Graphics.createCallback(LCD_WIDTH, LCD_HEIGHT, 16, { setPixel:function(x,y,c){ spi.write(0x12A,[x>>8,x,(x+1)>>8,x+1], 0x12B,[y>>8,y,(y+1)>>8,y+1], 0x12C,[c>>8,c], ce); }, ...
instead of:
function writeCD(c,d){ dc.write(0); ce.write(0); spi.send(c); dc.write(1); spi.send(d); ce.write(1); } var LCD = Graphics.createCallback(LCD_WIDTH, LCD_HEIGHT, 16, { setPixel:function(x,y,c){ writeCD(0x2A,[x>>8,x,(x+1)>>8,x+1]); writeCD(0x2B,[y>>8,y,(y+1)>>8,y+1]); writeCD(0x2C,[c>>8,c]); }, ...
Sorry, something went wrong.
edit: misunderstood this one.
Still closing though - I think this is overkill for most things, and the gfx speed issues could probably be solved another way.
No branches or pull requests
Many SPI LCDs have a D/C (data/command) pin, and expect command + data pairs of bytes. It'd make a massive amount of sense to allow:
where the 9th bit of the supplied data was the value of the DC pin for that byte.
The text was updated successfully, but these errors were encountered: