Initial STLcd code.

- Basic screen initialization and clear is working
- Currently SPI is set to a low speed for easy logic analyzer debugging
This commit is contained in:
Jacob Alexander 2015-04-14 00:40:48 -07:00
parent e41444304b
commit 8942ab63d5
7 changed files with 554 additions and 3 deletions

View file

@ -130,6 +130,28 @@ void main()
PORTB_PCR16 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
GPIOB_PSOR |= (1<<16);
*/
// RST
GPIOC_PDDR |= (1<<8);
PORTC_PCR8 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
GPIOC_PSOR |= (1<<8);
/*
// CS1B
GPIOC_PDDR |= (1<<4);
PORTC_PCR4 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
GPIOC_PCOR |= (1<<4);
*/
// Backlight
GPIOC_PDDR |= (1<<1);
PORTC_PCR1 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
GPIOC_PCOR |= (1<<1);
GPIOC_PDDR |= (1<<2);
PORTC_PCR2 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
GPIOC_PCOR |= (1<<2);
GPIOC_PDDR |= (1<<3);
PORTC_PCR3 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
GPIOC_PCOR |= (1<<3);
flash_prepare_flashing();