A C12832 LCD with generic interface
Dependents: mbed_blinky HTTPClient_HelloWorld websocketandnode xbeerx ... more
Fork of C12832 by
Diff: C12832_lcd.cpp
- Revision:
- 14:b834d587bf45
- Parent:
- 13:8a9cad03124b
--- a/C12832_lcd.cpp Wed Jan 01 08:41:07 2014 +0000 +++ b/C12832_lcd.cpp Wed Jan 08 16:56:49 2014 +0000 @@ -102,7 +102,7 @@ { _A0 = 0; _CS = 0; -#if defined TARGET_LPC1768 // fast without mbed lib +#if defined TARGET_LPC17699 // fast without mbed lib LPC_SSP1->DR = cmd; do { } while ((LPC_SSP1->SR & 0x10) == 0x10); // wait for SPI1 idle @@ -118,7 +118,7 @@ { _A0 = 1; _CS = 0; -#if defined TARGET_LPC1768 // fast without mbed lib +#if defined TARGET_LPC17699 // fast without mbed lib LPC_SSP1->DR = dat; do { } while ((LPC_SSP1->SR & 0x10) == 0x10); // wait for SPI1 idle @@ -163,7 +163,7 @@ wr_cmd(0xA6); // display normal -#if defined TARGET_LPC1768 //setup DMA channel 0 +#if defined TARGET_LPC17699 //setup DMA channel 0 LPC_SC->PCONP |= (1UL << 29); // Power up the GPDMA LPC_GPDMA->DMACConfig = 1; // enable DMA controller LPC_GPDMA->DMACIntTCClear = 0x1; @@ -202,7 +202,7 @@ void C12832_LCD::copy_to_lcd(void) { -#ifndef TARGET_LPC1768 +#ifndef TARGET_LPC17699 int i; #endif //page 0 @@ -210,7 +210,7 @@ wr_cmd(0x10); // set column hi nibble 0 wr_cmd(0xB0); // set page address 0 _A0 = 1; -#if defined TARGET_LPC1768 +#if defined TARGET_LPC17699 _CS = 0; // start 128 byte DMA transfer to SPI1 LPC_GPDMACH0->DMACCDestAddr = (uint32_t)&LPC_SSP1->DR; // we send to SSP1 @@ -237,7 +237,7 @@ wr_cmd(0x10); // set column hi nibble 0 wr_cmd(0xB1); // set page address 1 _A0 = 1; -#if defined TARGET_LPC1768 +#if defined TARGET_LPC17699 _CS = 0; // start 128 byte DMA transfer to SPI1 LPC_GPDMA->DMACIntTCClear = 0x1; @@ -262,7 +262,7 @@ wr_cmd(0x10); // set column hi nibble 0 wr_cmd(0xB2); // set page address 2 _A0 = 1; -#if defined TARGET_LPC1768 +#if defined TARGET_LPC17699 _CS = 0; // start 128 byte DMA transfer to SPI1 LPC_GPDMA->DMACIntTCClear = 0x1; @@ -289,7 +289,7 @@ _A0 = 1; _CS = 0; -#if defined TARGET_LPC1768 +#if defined TARGET_LPC17699 // start 128 byte DMA transfer to SPI1 LPC_GPDMA->DMACIntTCClear = 0x1; LPC_GPDMA->DMACIntErrClr = 0x1;