Fork of Silabs MemoryLCD library

Dependents:   demoUI whrmDemoUI Host_Software_MAX32664GWEB_HR_EXTENDED Host_Software_MAX32664GWEC_SpO2_HR-_EXTE ... more

C++ library for Sharp Microelectronics 1.28 inch LCD TFT, LS013B7DH03, SPI bus. Forked from Silicon Labs MemoryLCD display driver.

Committer:
stevew817
Date:
Wed Aug 12 13:32:01 2015 +0000
Revision:
10:231fa7861d1f
Parent:
6:fe04073fe90c
Use masking instead of modulo to speed up operation of pixel()

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Steven Cooreman 0:a0faa86660d4 1 #ifndef LCDSETTINGS_H
Steven Cooreman 0:a0faa86660d4 2 #define LCDSETTINGS_H
Steven Cooreman 0:a0faa86660d4 3
Steven Cooreman 0:a0faa86660d4 4 /** MemoryLCD width in pixels */
Steven Cooreman 0:a0faa86660d4 5 #define DISPLAY_WIDTH (128)
Steven Cooreman 0:a0faa86660d4 6
Steven Cooreman 0:a0faa86660d4 7 /** MemoryLCD height in pixels */
Steven Cooreman 0:a0faa86660d4 8 #define DISPLAY_HEIGHT (128)
Steven Cooreman 0:a0faa86660d4 9
Steven Cooreman 0:a0faa86660d4 10 /** Data type for storing buffer the pixel buffer */
stevew817 6:fe04073fe90c 11 #if ((DISPLAY_WIDTH % 32) == 0)
Steven Cooreman 0:a0faa86660d4 12 #define DISPLAY_BUFFER_TYPE uint32_t
stevew817 10:231fa7861d1f 13 #define DISPLAY_BUFFER_TYPE_MASK (0x1F)
stevew817 6:fe04073fe90c 14 #else
stevew817 6:fe04073fe90c 15 #define DISPLAY_BUFFER_TYPE uint8_t
stevew817 10:231fa7861d1f 16 #define DISPLAY_BUFFER_TYPE_MASK (0x07)
stevew817 6:fe04073fe90c 17 #endif
Steven Cooreman 0:a0faa86660d4 18
Steven Cooreman 0:a0faa86660d4 19 #define DISPLAY_BUFFER_TYPE_SIZE (sizeof(DISPLAY_BUFFER_TYPE) * 8)
Steven Cooreman 0:a0faa86660d4 20 #define DISPLAY_BUFFER_ELEMENTS ((DISPLAY_WIDTH*DISPLAY_HEIGHT)/DISPLAY_BUFFER_TYPE_SIZE)
Steven Cooreman 0:a0faa86660d4 21
Steven Cooreman 0:a0faa86660d4 22 /** Maximum length of a printf to the display */
Steven Cooreman 0:a0faa86660d4 23 #define MAX_PRINTF_CHARS 40
Steven Cooreman 0:a0faa86660d4 24
Steven Cooreman 0:a0faa86660d4 25 /** Color definitions */
Steven Cooreman 0:a0faa86660d4 26 #define White 0xFFFFFFFF
Steven Cooreman 0:a0faa86660d4 27 #define Black 0x00000000
Steven Cooreman 0:a0faa86660d4 28
Steven Cooreman 0:a0faa86660d4 29 #endif