Implement lcd_get_dpi() for all bitmap targets.

DPI values are autogenerated from the resolution and collected display size
values. These values are inserted as comments as well.

Change-Id: Id03aedf9af18348f773dfce002805e480f6751e8
This commit is contained in:
Thomas Martitz 2014-01-23 08:23:34 +01:00
parent ee28a706d4
commit 62524237f0
85 changed files with 171 additions and 8 deletions

View file

@ -31,6 +31,8 @@
/* LCD dimensions */
#define LCD_WIDTH 112
#define LCD_HEIGHT 64
/* sqrt(112^2 + 64^2) / 1.5 = 85.4 */
#define LCD_DPI 85
#define LCD_DEPTH 1
#define LCD_PIXEL_ASPECT_WIDTH 4

View file

@ -24,6 +24,8 @@
/* LCD dimensions */
#define LCD_WIDTH 112
#define LCD_HEIGHT 64
/* sqrt(112^2 + 64^2) / 1.5 = 83.8 */
#define LCD_DPI 84
#define LCD_DEPTH 1
#define LCD_PIXEL_ASPECT_WIDTH 4

View file

@ -17,6 +17,8 @@
/* LCD dimensions */
#define LCD_WIDTH 112
#define LCD_HEIGHT 64
/* sqrt(112^2 + 64^2) / 1.5 = 83.8 */
#define LCD_DPI 84
#define LCD_DEPTH 1
#define LCD_PIXEL_ASPECT_WIDTH 4

View file

@ -11,6 +11,8 @@
#define LCD_WIDTH 11
#define LCD_HEIGHT 2
/* sqrt(11^2 + 2^2) / 1.5 = 7.5 */
#define LCD_DPI 7
#define LCD_DEPTH 1
#define SIM_LCD_WIDTH 132 /* pixels */
#define SIM_LCD_HEIGHT 64 /* pixels */

View file

@ -31,6 +31,8 @@
/* LCD dimensions */
#define LCD_WIDTH 112
#define LCD_HEIGHT 64
/* sqrt(112^2 + 64^2) / 1.5 = 85.4 */
#define LCD_DPI 85
#define LCD_DEPTH 1
#define LCD_PIXEL_ASPECT_WIDTH 4

View file

@ -31,6 +31,8 @@
/* LCD dimensions */
#define LCD_WIDTH 112
#define LCD_HEIGHT 64
/* sqrt(112^2 + 64^2) / 1.5 = 85.4 */
#define LCD_DPI 85
#define LCD_DEPTH 1
#define LCD_PIXEL_ASPECT_WIDTH 4

View file

@ -72,6 +72,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.5 = 160.0 */
#define LCD_DPI 160
#define LCD_DPI 160
#define LCD_DEPTH 16
#define LCD_PIXELFORMAT RGB565

View file

@ -93,6 +93,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.5 = 160.0 */
#define LCD_DPI 160
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
/* framebuffer uses 24-bit/pix */

View file

@ -96,6 +96,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 160
/* sqrt(128^2 + 160^2) / 1.8 = 113.8 */
#define LCD_DPI 114
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -93,6 +93,8 @@
/* LCD dimensions */
#define LCD_WIDTH 132
#define LCD_HEIGHT 132
/* sqrt(132^2 + 132^2) / 1.5 = 124.5 */
#define LCD_DPI 124
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -97,6 +97,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.5 = 160.0 */
#define LCD_DPI 160
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
/* framebuffer uses 24-bit/pix */

View file

@ -103,6 +103,8 @@
/* LCD dimensions */
#define LCD_WIDTH 176
#define LCD_HEIGHT 220
/* sqrt(176^2 + 220^2) / 2.0 = 140.9 */
#define LCD_DPI 141
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -64,6 +64,8 @@
#define LCD_WIDTH 640
#define LCD_HEIGHT 480
/* sqrt(640^2 + 480^2) / 2.5 = 320.0 */
#define LCD_DPI 320
#define LCD_DEPTH 16 /* 65k colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -42,6 +42,8 @@
/* LCD dimensions */
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
/* sqrt(240^2 + 320^2) / 2.2 = 181.8 */
#define LCD_DPI 182
#define LCD_DEPTH 16 /* 65k colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -46,6 +46,8 @@
/* LCD dimensions */
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
/* sqrt(240^2 + 320^2) / 2.4 = 166.7 */
#define LCD_DPI 167
#define LCD_DEPTH 16 /* 65k colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -51,6 +51,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 128
/* sqrt(128^2 + 128^2) / 1.5 = 120.7 */
#define LCD_DPI 121
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 byte-swapped */

View file

@ -51,6 +51,8 @@
/* LCD dimensions */
#define LCD_WIDTH 220
#define LCD_HEIGHT 176
/* sqrt(220^2 + 176^2) / 2.0 = 140.9 */
#define LCD_DPI 141
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */

View file

@ -35,6 +35,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 160
/* sqrt(128^2 + 160^2) / 1.7 = 120.5 */
#define LCD_DPI 121
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -62,6 +62,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.4 = 169.5 */
#define LCD_DPI 169
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -62,6 +62,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.4 = 169.5 */
#define LCD_DPI 169
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -62,6 +62,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.4 = 169.5 */
#define LCD_DPI 169
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -62,6 +62,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.4 = 169.5 */
#define LCD_DPI 169
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -67,6 +67,8 @@
/* LCD dimensions */
#define LCD_WIDTH 220
#define LCD_HEIGHT 176
/* sqrt(220^2 + 176^2) / 2.0 = 140.9 */
#define LCD_DPI 141
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -64,6 +64,8 @@
/* LCD dimensions */
#define LCD_WIDTH 220
#define LCD_HEIGHT 176
/* sqrt(220^2 + 176^2) / 2.0 = 140.9 */
#define LCD_DPI 141
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -74,6 +74,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.3 = 157.6 */
#define LCD_DPI 158
/* 16bits for now... */
#define LCD_DEPTH 16 /* 262144 colours */
#define LCD_PIXELFORMAT RGB565 /*rgb565*/

View file

@ -57,6 +57,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.8 = 113.8 */
#define LCD_DPI 114
#define LCD_DEPTH 2
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -56,6 +56,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.8 = 113.8 */
#define LCD_DPI 114
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -67,6 +67,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.4 = 166.7 */
#define LCD_DPI 167
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -67,6 +67,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.4 = 166.7 */
#define LCD_DPI 167
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -53,6 +53,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 2.0 = 102.4 */
#define LCD_DPI 102
#define LCD_DEPTH 2 /* 4 colours - 2bpp */
#define LCD_PIXELFORMAT HORIZONTAL_PACKING

View file

@ -53,6 +53,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 2.0 = 102.4 */
#define LCD_DPI 102
#define LCD_DEPTH 2 /* 4 colours - 2bpp */
#define LCD_PIXELFORMAT HORIZONTAL_PACKING

View file

@ -55,6 +55,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 2.0 = 102.4 */
#define LCD_DPI 102
#define LCD_DEPTH 2 /* 4 colours - 2bpp */
#define LCD_PIXELFORMAT HORIZONTAL_PACKING

View file

@ -78,6 +78,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.5 = 160.0 */
#define LCD_DPI 160
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -52,6 +52,8 @@
/* LCD dimensions */
#define LCD_WIDTH 220
#define LCD_HEIGHT 176
/* sqrt(220^2 + 176^2) / 2.0 = 140.9 */
#define LCD_DPI 141
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */

View file

@ -55,6 +55,8 @@
/* LCD dimensions */
#define LCD_WIDTH 138
#define LCD_HEIGHT 110
/* sqrt(138^2 + 110^2) / 1.7 = 105.7 */
#define LCD_DPI 106
#define LCD_DEPTH 2 /* 4 colours - 2bpp */
#define LCD_PIXELFORMAT HORIZONTAL_PACKING

View file

@ -55,6 +55,8 @@
/* LCD dimensions */
#define LCD_WIDTH 138
#define LCD_HEIGHT 110
/* sqrt(138^2 + 110^2) / 1.7 = 105.7 */
#define LCD_DPI 106
#define LCD_DEPTH 2 /* 4 colours - 2bpp */
#define LCD_PIXELFORMAT HORIZONTAL_PACKING

View file

@ -52,6 +52,8 @@
/* LCD dimensions */
#define LCD_WIDTH 176
#define LCD_HEIGHT 132
/* sqrt(176^2 + 132^2) / 1.5 = 146.7 */
#define LCD_DPI 147
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */

View file

@ -82,6 +82,8 @@
/* LCD dimensions */
#define LCD_WIDTH 176
#define LCD_HEIGHT 132
/* sqrt(176^2 + 132^2) / 1.5 = 146.7 */
#define LCD_DPI 147
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -54,6 +54,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.5 = 160.0 */
#define LCD_DPI 160
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -50,6 +50,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.5 = 136.6 */
#define LCD_DPI 137
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */

View file

@ -41,6 +41,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.9 = 107.8 */
#define LCD_DPI 108
#define LCD_DEPTH 2
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -50,6 +50,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 128
/* sqrt(128^2 + 128^2) / 1.5 = 120.7 */
#define LCD_DPI 121
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */

View file

@ -41,6 +41,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.9 = 107.8 */
#define LCD_DPI 108
#define LCD_DEPTH 2
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -41,6 +41,8 @@
/* LCD dimensions */
#define LCD_WIDTH 220
#define LCD_HEIGHT 176
/* sqrt(220^2 + 176^2) / 2.0 = 140.9 */
#define LCD_DPI 141
#define LCD_DEPTH 16 /* 65k colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -21,6 +21,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
/* sqrt(128^2 + 64^2) / 1.0 = 143.1 */
#define LCD_DPI 143
#define LCD_DEPTH 1
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -48,6 +48,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
/* sqrt(128^2 + 64^2) / 1.0 = 143.1 */
#define LCD_DPI 143
#define LCD_DEPTH 1
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -44,6 +44,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 128
/* sqrt(128^2 + 128^2) / 1.8 = 100.6 */
#define LCD_DPI 101
/* The LCD used is just rgb444, 64 colours. We do a bit conversion on LCD
* drivers. */
#define LCD_DEPTH 16 /* 65536 colours */

View file

@ -60,6 +60,8 @@
/* LCD dimensions */
#define LCD_WIDTH 176
#define LCD_HEIGHT 132
/* sqrt(176^2 + 132^2) / 1.5 = 146.7 */
#define LCD_DPI 147
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -60,6 +60,8 @@
/* LCD dimensions */
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.6 = 153.8 */
#define LCD_DPI 154
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -66,6 +66,8 @@
/* LCD dimensions */
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
/* sqrt(240^2 + 320^2) / 2.4 = 166.0 */
#define LCD_DPI 166
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -59,6 +59,8 @@
/* LCD dimensions */
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
/* sqrt(240^2 + 320^2) / 3.5 = 114.3 */
#define LCD_DPI 114
#define LCD_DPI 114 /* 400 pixels diagonally / 3.5 inch */
/* The LCD is configured for RGB565 */
#define LCD_DEPTH 16 /* 65536 colours */

View file

@ -53,6 +53,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 128
/* sqrt(128^2 + 128^2) / 1.6 = 113.1 */
#define LCD_DPI 113
#define LCD_DEPTH 2
#define LCD_PIXELFORMAT VERTICAL_INTERLEAVED

View file

@ -53,6 +53,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 2.0 = 102.4 */
#define LCD_DPI 102
#define LCD_DEPTH 2
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -24,6 +24,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.7 = 120.5 */
#define LCD_DPI 121
#define LCD_DEPTH 1
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -64,6 +64,8 @@
/* LCD dimensions */
#define LCD_WIDTH 480
#define LCD_HEIGHT 272
/* sqrt(480^2 + 272^2) / 4.3 = 128.3 */
#define LCD_DPI 128
#define LCD_DPI 128
#define LCD_DEPTH 16 /* 16bit colours */

View file

@ -72,6 +72,8 @@
/* LCD dimensions */
#define LCD_WIDTH 400
#define LCD_HEIGHT 240
/* sqrt(400^2 + 240^2) / 3.0 = 155.5 */
#define LCD_DPI 155
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -29,6 +29,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 96
/* sqrt(128^2 + 96^2) / 1.5 = 106.7 */
#define LCD_DPI 107
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565

View file

@ -29,6 +29,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.8 = 113.8 */
#define LCD_DPI 114
#define LCD_DEPTH 2
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -29,6 +29,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.8 = 113.8 */
#define LCD_DPI 114
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565

View file

@ -44,6 +44,8 @@
/* LCD dimensions */
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
/* sqrt(240^2 + 320^2) / 2.6 = 153.8 */
#define LCD_DPI 154
#define LCD_DEPTH 16
/* Check that but should not matter */

View file

@ -57,6 +57,8 @@
/* LCD dimensions */
#define LCD_WIDTH 176
#define LCD_HEIGHT 220
/* sqrt(176^2 + 220^2) / 1.8 = 156.5 */
#define LCD_DPI 157
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -98,6 +98,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 160
/* sqrt(128^2 + 160^2) / 1.8 = 113.8 */
#define LCD_DPI 114
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -41,6 +41,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
/* sqrt(128^2 + 64^2) / 1.7 = 84.2 */
#define LCD_DPI 84
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /*rgb565*/

View file

@ -51,6 +51,8 @@
/* LCD dimensions */
#define LCD_WIDTH 132
#define LCD_HEIGHT 80
/* sqrt(132^2 + 80^2) / 1.4 = 110.3 */
#define LCD_DPI 110
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -53,6 +53,8 @@
/* LCD dimensions */
#define LCD_WIDTH 132
#define LCD_HEIGHT 80
/* sqrt(132^2 + 80^2) / 1.4 = 110.3 */
#define LCD_DPI 110
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -41,6 +41,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
/* sqrt(128^2 + 64^2) / 1.0 = 143.1 */
#define LCD_DPI 143
#define LCD_DEPTH 1
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -45,6 +45,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
/* sqrt(128^2 + 64^2) / 1.0 = 143.1 */
#define LCD_DPI 143
#define LCD_DEPTH 1
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -41,6 +41,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
/* sqrt(128^2 + 64^2) / 1.0 = 143.1 */
#define LCD_DPI 143
#define LCD_DEPTH 1
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -57,6 +57,8 @@
/* LCD dimensions */
#define LCD_WIDTH 96
#define LCD_HEIGHT 96
/* sqrt(96^2 + 96^2) / 1.1 = 123.4 */
#define LCD_DPI 123
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565

View file

@ -74,6 +74,8 @@
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
/* sqrt(240^2 + 320^2) / 2.2 = 181.8 */
#define LCD_DPI 182
#define LCD_DEPTH 16 /* 65k colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -51,6 +51,8 @@
/* LCD dimensions */
#define LCD_WIDTH 176
#define LCD_HEIGHT 220
/* sqrt(176^2 + 220^2) / 1.8 = 156.5 */
#define LCD_DPI 157
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -51,6 +51,8 @@
/* LCD dimensions */
#define LCD_WIDTH 176
#define LCD_HEIGHT 220
/* sqrt(176^2 + 220^2) / 1.8 = 156.5 */
#define LCD_DPI 157
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -93,6 +93,8 @@
/* LCD dimensions */
#define LCD_WIDTH 220
#define LCD_HEIGHT 176
/* sqrt(220^2 + 176^2) / 2.2 = 128.1 */
#define LCD_DPI 128
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -89,6 +89,8 @@
/* LCD dimensions */
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
/* sqrt(240^2 + 320^2) / 2.4 = 166.7 */
#define LCD_DPI 167
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -104,6 +104,8 @@
/* LCD dimensions */
#define LCD_WIDTH 220
#define LCD_HEIGHT 176
/* sqrt(220^2 + 176^2) / 2.2 = 128.1 */
#define LCD_DPI 128
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 swapped */

View file

@ -42,6 +42,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
/* sqrt(128^2 + 64^2) / 1.8 = 79.5 */
#define LCD_DPI 80
#define LCD_DEPTH 1
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -52,6 +52,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
/* sqrt(128^2 + 64^2) / 1.8 = 79.5 */
#define LCD_DPI 80
#define LCD_DEPTH 1
#define LCD_PIXELFORMAT VERTICAL_PACKING

View file

@ -46,6 +46,8 @@
/* LCD dimensions */
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
/* sqrt(240^2 + 320^2) / 2.4 = 166.7 */
#define LCD_DPI 167
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -87,6 +87,8 @@
/* LCD dimensions */
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
/* sqrt(240^2 + 320^2) / 2.0 = 200.0 */
#define LCD_DPI 200
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -84,6 +84,8 @@
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 160
/* sqrt(128^2 + 160^2) / 1.7 = 120.5 */
#define LCD_DPI 121
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -36,6 +36,8 @@
/* LCD dimensions */
#define LCD_WIDTH 220
#define LCD_HEIGHT 176
/* sqrt(220^2 + 176^2) / 2.2 = 128.1 */
#define LCD_DPI 128
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565

View file

@ -55,6 +55,8 @@
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
/* sqrt(160^2 + 128^2) / 1.8 = 113.8 */
#define LCD_DPI 114
#define LCD_DEPTH 16 /* 65536 colors */
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 */

View file

@ -64,6 +64,8 @@
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.5 = 160.0 */
#define LCD_DPI 160
#define LCD_DEPTH 16 /* 65k colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -64,6 +64,8 @@
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
/* sqrt(320^2 + 240^2) / 2.5 = 160.0 */
#define LCD_DPI 160
#define LCD_DEPTH 16 /* 65k colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */

View file

@ -535,20 +535,15 @@ extern void lcd_bmp_part(const struct bitmap* bm, int src_x, int src_y,
extern void lcd_bmp(const struct bitmap* bm, int x, int y);
extern void lcd_nine_segment_bmp(const struct bitmap* bm, int x, int y,
int width, int height);
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_TOUCHSCREEN
/* only needed for touchscreen for now, feel free to implement it for others
* once needed
*/
/* TODO: Impement this for remote displays if ever needed */
#if defined(LCD_DPI) && (LCD_DPI > 0)
/* returns the pixel density of the display */
static inline int lcd_get_dpi(void) { return LCD_DPI; }
#else
extern int lcd_get_dpi(void);
#endif /* LCD_DPI */
#endif /* HAVE_TOUCHSCREEN */
#endif /* HAVE_LCD_BITMAP */
#endif /* __LCD_H__ */