From 62524237f0055d2825d6cde90c49840404c57e30 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 23 Jan 2014 08:23:34 +0100 Subject: 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 --- firmware/export/config/archosfmrecorder.h | 2 ++ firmware/export/config/archosondiofm.h | 2 ++ firmware/export/config/archosondiosp.h | 2 ++ firmware/export/config/archosplayer.h | 2 ++ firmware/export/config/archosrecorder.h | 2 ++ firmware/export/config/archosrecorderv2.h | 2 ++ firmware/export/config/cowond2.h | 2 ++ firmware/export/config/creativezen.h | 2 ++ firmware/export/config/creativezenmozaic.h | 2 ++ firmware/export/config/creativezenv.h | 2 ++ firmware/export/config/creativezenxfi.h | 2 ++ firmware/export/config/creativezenxfi3.h | 2 ++ firmware/export/config/creativezv.h | 2 ++ firmware/export/config/gigabeatfx.h | 2 ++ firmware/export/config/gigabeats.h | 2 ++ firmware/export/config/gogearhdd1630.h | 2 ++ firmware/export/config/gogearhdd6330.h | 2 ++ firmware/export/config/gogearsa9200.h | 2 ++ firmware/export/config/hifietma8.h | 2 ++ firmware/export/config/hifietma8c.h | 2 ++ firmware/export/config/hifietma9.h | 2 ++ firmware/export/config/hifietma9c.h | 2 ++ firmware/export/config/hifimanhm60x.h | 2 ++ firmware/export/config/hifimanhm801.h | 2 ++ firmware/export/config/iaudio7.h | 2 ++ firmware/export/config/iaudiom5.h | 2 ++ firmware/export/config/iaudiox5.h | 2 ++ firmware/export/config/ihifi760.h | 2 ++ firmware/export/config/ihifi960.h | 2 ++ firmware/export/config/ipod1g2g.h | 2 ++ firmware/export/config/ipod3g.h | 2 ++ firmware/export/config/ipod4g.h | 2 ++ firmware/export/config/ipod6g.h | 2 ++ firmware/export/config/ipodcolor.h | 2 ++ firmware/export/config/ipodmini1g.h | 2 ++ firmware/export/config/ipodmini2g.h | 2 ++ firmware/export/config/ipodnano1g.h | 2 ++ firmware/export/config/ipodnano2g.h | 2 ++ firmware/export/config/ipodvideo.h | 2 ++ firmware/export/config/iriverh10.h | 2 ++ firmware/export/config/iriverh100.h | 2 ++ firmware/export/config/iriverh10_5gb.h | 2 ++ firmware/export/config/iriverh120.h | 2 ++ firmware/export/config/iriverh300.h | 2 ++ firmware/export/config/iriverifp7xx.h | 2 ++ firmware/export/config/logikdax.h | 2 ++ firmware/export/config/lyreproto1.h | 2 ++ firmware/export/config/meizum3.h | 2 ++ firmware/export/config/meizum6sl.h | 2 ++ firmware/export/config/meizum6sp.h | 2 ++ firmware/export/config/mini2440.h | 2 ++ firmware/export/config/mpiohd200.h | 2 ++ firmware/export/config/mpiohd300.h | 2 ++ firmware/export/config/mrobe100.h | 2 ++ firmware/export/config/ondavx767.h | 2 ++ firmware/export/config/rk27generic.h | 2 ++ firmware/export/config/samsungyh820.h | 2 ++ firmware/export/config/samsungyh920.h | 2 ++ firmware/export/config/samsungyh925.h | 2 ++ firmware/export/config/samsungypr0.h | 2 ++ firmware/export/config/samsungyps3.h | 2 ++ firmware/export/config/samsungypz5.h | 2 ++ firmware/export/config/sansac100.h | 2 ++ firmware/export/config/sansac200.h | 2 ++ firmware/export/config/sansac200v2.h | 2 ++ firmware/export/config/sansaclip.h | 2 ++ firmware/export/config/sansaclipplus.h | 2 ++ firmware/export/config/sansaclipv2.h | 2 ++ firmware/export/config/sansaclipzip.h | 2 ++ firmware/export/config/sansaconnect.h | 2 ++ firmware/export/config/sansae200.h | 2 ++ firmware/export/config/sansae200v2.h | 2 ++ firmware/export/config/sansafuze.h | 2 ++ firmware/export/config/sansafuzeplus.h | 2 ++ firmware/export/config/sansafuzev2.h | 2 ++ firmware/export/config/sansam200.h | 2 ++ firmware/export/config/sansam200v4.h | 2 ++ firmware/export/config/sansaview.h | 2 ++ firmware/export/config/sonynwze360.h | 2 ++ firmware/export/config/sonynwze370.h | 2 ++ firmware/export/config/tatungtpj1022.h | 2 ++ firmware/export/config/vibe500.h | 2 ++ firmware/export/config/zenvisionm30gb.h | 2 ++ firmware/export/config/zenvisionm60gb.h | 2 ++ firmware/export/lcd.h | 11 +++-------- 85 files changed, 171 insertions(+), 8 deletions(-) diff --git a/firmware/export/config/archosfmrecorder.h b/firmware/export/config/archosfmrecorder.h index 993f473dde..0c64d70be4 100644 --- a/firmware/export/config/archosfmrecorder.h +++ b/firmware/export/config/archosfmrecorder.h @@ -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 diff --git a/firmware/export/config/archosondiofm.h b/firmware/export/config/archosondiofm.h index e3ebda032d..68ecc217c1 100644 --- a/firmware/export/config/archosondiofm.h +++ b/firmware/export/config/archosondiofm.h @@ -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 diff --git a/firmware/export/config/archosondiosp.h b/firmware/export/config/archosondiosp.h index 0967b794e2..3e9de1eda6 100644 --- a/firmware/export/config/archosondiosp.h +++ b/firmware/export/config/archosondiosp.h @@ -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 diff --git a/firmware/export/config/archosplayer.h b/firmware/export/config/archosplayer.h index af125571ba..2e0219cff5 100644 --- a/firmware/export/config/archosplayer.h +++ b/firmware/export/config/archosplayer.h @@ -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 */ diff --git a/firmware/export/config/archosrecorder.h b/firmware/export/config/archosrecorder.h index fb11ac52ba..016ea8b944 100644 --- a/firmware/export/config/archosrecorder.h +++ b/firmware/export/config/archosrecorder.h @@ -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 diff --git a/firmware/export/config/archosrecorderv2.h b/firmware/export/config/archosrecorderv2.h index 17e804d9c4..4640eae247 100644 --- a/firmware/export/config/archosrecorderv2.h +++ b/firmware/export/config/archosrecorderv2.h @@ -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 diff --git a/firmware/export/config/cowond2.h b/firmware/export/config/cowond2.h index d27589c878..1d9961b2ae 100644 --- a/firmware/export/config/cowond2.h +++ b/firmware/export/config/cowond2.h @@ -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 diff --git a/firmware/export/config/creativezen.h b/firmware/export/config/creativezen.h index 004e1403b7..1bfc056063 100644 --- a/firmware/export/config/creativezen.h +++ b/firmware/export/config/creativezen.h @@ -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 */ diff --git a/firmware/export/config/creativezenmozaic.h b/firmware/export/config/creativezenmozaic.h index 59012012ee..664459bf89 100644 --- a/firmware/export/config/creativezenmozaic.h +++ b/firmware/export/config/creativezenmozaic.h @@ -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 */ diff --git a/firmware/export/config/creativezenv.h b/firmware/export/config/creativezenv.h index 9426cc0c4d..03dc261b85 100644 --- a/firmware/export/config/creativezenv.h +++ b/firmware/export/config/creativezenv.h @@ -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 */ diff --git a/firmware/export/config/creativezenxfi.h b/firmware/export/config/creativezenxfi.h index c0c031646a..6128d68aa0 100644 --- a/firmware/export/config/creativezenxfi.h +++ b/firmware/export/config/creativezenxfi.h @@ -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 */ diff --git a/firmware/export/config/creativezenxfi3.h b/firmware/export/config/creativezenxfi3.h index 86d540304a..1a5fa25ae5 100644 --- a/firmware/export/config/creativezenxfi3.h +++ b/firmware/export/config/creativezenxfi3.h @@ -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 */ diff --git a/firmware/export/config/creativezv.h b/firmware/export/config/creativezv.h index 725a857698..b96bfcce77 100644 --- a/firmware/export/config/creativezv.h +++ b/firmware/export/config/creativezv.h @@ -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 */ diff --git a/firmware/export/config/gigabeatfx.h b/firmware/export/config/gigabeatfx.h index 2d1f89149d..c9e20ad8a7 100644 --- a/firmware/export/config/gigabeatfx.h +++ b/firmware/export/config/gigabeatfx.h @@ -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 */ diff --git a/firmware/export/config/gigabeats.h b/firmware/export/config/gigabeats.h index 9ee5142b34..11fc02be3d 100644 --- a/firmware/export/config/gigabeats.h +++ b/firmware/export/config/gigabeats.h @@ -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 */ diff --git a/firmware/export/config/gogearhdd1630.h b/firmware/export/config/gogearhdd1630.h index 39aa01ea51..19ddeb6326 100644 --- a/firmware/export/config/gogearhdd1630.h +++ b/firmware/export/config/gogearhdd1630.h @@ -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 */ diff --git a/firmware/export/config/gogearhdd6330.h b/firmware/export/config/gogearhdd6330.h index e96b4ab8c6..c28a2e4dca 100644 --- a/firmware/export/config/gogearhdd6330.h +++ b/firmware/export/config/gogearhdd6330.h @@ -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 */ diff --git a/firmware/export/config/gogearsa9200.h b/firmware/export/config/gogearsa9200.h index a2f0489cef..40964a781f 100644 --- a/firmware/export/config/gogearsa9200.h +++ b/firmware/export/config/gogearsa9200.h @@ -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 */ diff --git a/firmware/export/config/hifietma8.h b/firmware/export/config/hifietma8.h index 7d36882832..f5cf8cfac3 100644 --- a/firmware/export/config/hifietma8.h +++ b/firmware/export/config/hifietma8.h @@ -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 */ diff --git a/firmware/export/config/hifietma8c.h b/firmware/export/config/hifietma8c.h index 4e2d605523..897716b3c8 100644 --- a/firmware/export/config/hifietma8c.h +++ b/firmware/export/config/hifietma8c.h @@ -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 */ diff --git a/firmware/export/config/hifietma9.h b/firmware/export/config/hifietma9.h index 516d1fe9ed..5df1a5fac4 100644 --- a/firmware/export/config/hifietma9.h +++ b/firmware/export/config/hifietma9.h @@ -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 */ diff --git a/firmware/export/config/hifietma9c.h b/firmware/export/config/hifietma9c.h index 6162aa2762..43f20de0c8 100644 --- a/firmware/export/config/hifietma9c.h +++ b/firmware/export/config/hifietma9c.h @@ -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 */ diff --git a/firmware/export/config/hifimanhm60x.h b/firmware/export/config/hifimanhm60x.h index f5b768defe..dbd7478338 100644 --- a/firmware/export/config/hifimanhm60x.h +++ b/firmware/export/config/hifimanhm60x.h @@ -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 */ diff --git a/firmware/export/config/hifimanhm801.h b/firmware/export/config/hifimanhm801.h index bcbf5e82f5..b1c1550183 100644 --- a/firmware/export/config/hifimanhm801.h +++ b/firmware/export/config/hifimanhm801.h @@ -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 */ diff --git a/firmware/export/config/iaudio7.h b/firmware/export/config/iaudio7.h index 89151e648a..8d03e04be2 100644 --- a/firmware/export/config/iaudio7.h +++ b/firmware/export/config/iaudio7.h @@ -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*/ diff --git a/firmware/export/config/iaudiom5.h b/firmware/export/config/iaudiom5.h index 2cde941ee2..f1ef78ae24 100644 --- a/firmware/export/config/iaudiom5.h +++ b/firmware/export/config/iaudiom5.h @@ -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 diff --git a/firmware/export/config/iaudiox5.h b/firmware/export/config/iaudiox5.h index 520c2ac641..62f6d595e3 100644 --- a/firmware/export/config/iaudiox5.h +++ b/firmware/export/config/iaudiox5.h @@ -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 */ diff --git a/firmware/export/config/ihifi760.h b/firmware/export/config/ihifi760.h index ea84a4a891..f31d64cac9 100644 --- a/firmware/export/config/ihifi760.h +++ b/firmware/export/config/ihifi760.h @@ -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 */ diff --git a/firmware/export/config/ihifi960.h b/firmware/export/config/ihifi960.h index 3ef6609aa5..06dcc8681e 100644 --- a/firmware/export/config/ihifi960.h +++ b/firmware/export/config/ihifi960.h @@ -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 */ diff --git a/firmware/export/config/ipod1g2g.h b/firmware/export/config/ipod1g2g.h index 4b2af2c3c3..1d0fd5c9fb 100644 --- a/firmware/export/config/ipod1g2g.h +++ b/firmware/export/config/ipod1g2g.h @@ -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 diff --git a/firmware/export/config/ipod3g.h b/firmware/export/config/ipod3g.h index d6de96bcbf..b34bd6547b 100644 --- a/firmware/export/config/ipod3g.h +++ b/firmware/export/config/ipod3g.h @@ -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 diff --git a/firmware/export/config/ipod4g.h b/firmware/export/config/ipod4g.h index 3ec15b7d8c..39890cbb19 100644 --- a/firmware/export/config/ipod4g.h +++ b/firmware/export/config/ipod4g.h @@ -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 diff --git a/firmware/export/config/ipod6g.h b/firmware/export/config/ipod6g.h index 11d77c2017..5590c96be1 100644 --- a/firmware/export/config/ipod6g.h +++ b/firmware/export/config/ipod6g.h @@ -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 */ diff --git a/firmware/export/config/ipodcolor.h b/firmware/export/config/ipodcolor.h index b844f61ec4..960adf97d6 100644 --- a/firmware/export/config/ipodcolor.h +++ b/firmware/export/config/ipodcolor.h @@ -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 */ diff --git a/firmware/export/config/ipodmini1g.h b/firmware/export/config/ipodmini1g.h index 3faf6930df..147812124a 100644 --- a/firmware/export/config/ipodmini1g.h +++ b/firmware/export/config/ipodmini1g.h @@ -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 diff --git a/firmware/export/config/ipodmini2g.h b/firmware/export/config/ipodmini2g.h index 5e4731679f..60959d64e8 100644 --- a/firmware/export/config/ipodmini2g.h +++ b/firmware/export/config/ipodmini2g.h @@ -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 diff --git a/firmware/export/config/ipodnano1g.h b/firmware/export/config/ipodnano1g.h index 18cb1a52b1..2a3bf4bb7a 100644 --- a/firmware/export/config/ipodnano1g.h +++ b/firmware/export/config/ipodnano1g.h @@ -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 */ diff --git a/firmware/export/config/ipodnano2g.h b/firmware/export/config/ipodnano2g.h index a6222c1db0..2c7db2a095 100644 --- a/firmware/export/config/ipodnano2g.h +++ b/firmware/export/config/ipodnano2g.h @@ -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 */ diff --git a/firmware/export/config/ipodvideo.h b/firmware/export/config/ipodvideo.h index 707c7d973b..8a6e53dc16 100644 --- a/firmware/export/config/ipodvideo.h +++ b/firmware/export/config/ipodvideo.h @@ -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 */ diff --git a/firmware/export/config/iriverh10.h b/firmware/export/config/iriverh10.h index d88de1cb6c..a5d0bf5d47 100644 --- a/firmware/export/config/iriverh10.h +++ b/firmware/export/config/iriverh10.h @@ -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 */ diff --git a/firmware/export/config/iriverh100.h b/firmware/export/config/iriverh100.h index 97dced732d..ac314c5342 100644 --- a/firmware/export/config/iriverh100.h +++ b/firmware/export/config/iriverh100.h @@ -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 diff --git a/firmware/export/config/iriverh10_5gb.h b/firmware/export/config/iriverh10_5gb.h index 5df47c9f96..9d52c8b317 100644 --- a/firmware/export/config/iriverh10_5gb.h +++ b/firmware/export/config/iriverh10_5gb.h @@ -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 */ diff --git a/firmware/export/config/iriverh120.h b/firmware/export/config/iriverh120.h index 6dccb9f3d0..bf97ee3c09 100644 --- a/firmware/export/config/iriverh120.h +++ b/firmware/export/config/iriverh120.h @@ -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 diff --git a/firmware/export/config/iriverh300.h b/firmware/export/config/iriverh300.h index aab31bc6a9..ce8f2151f0 100644 --- a/firmware/export/config/iriverh300.h +++ b/firmware/export/config/iriverh300.h @@ -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 */ diff --git a/firmware/export/config/iriverifp7xx.h b/firmware/export/config/iriverifp7xx.h index c15848f677..db905c4674 100644 --- a/firmware/export/config/iriverifp7xx.h +++ b/firmware/export/config/iriverifp7xx.h @@ -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 diff --git a/firmware/export/config/logikdax.h b/firmware/export/config/logikdax.h index c3a3873bed..0168cd810b 100644 --- a/firmware/export/config/logikdax.h +++ b/firmware/export/config/logikdax.h @@ -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 diff --git a/firmware/export/config/lyreproto1.h b/firmware/export/config/lyreproto1.h index 163d5be034..2ec1199acb 100644 --- a/firmware/export/config/lyreproto1.h +++ b/firmware/export/config/lyreproto1.h @@ -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 */ diff --git a/firmware/export/config/meizum3.h b/firmware/export/config/meizum3.h index b8b8f5bc2c..9c88db0621 100644 --- a/firmware/export/config/meizum3.h +++ b/firmware/export/config/meizum3.h @@ -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 */ diff --git a/firmware/export/config/meizum6sl.h b/firmware/export/config/meizum6sl.h index 7db6b9bf36..7d568f3319 100644 --- a/firmware/export/config/meizum6sl.h +++ b/firmware/export/config/meizum6sl.h @@ -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 */ diff --git a/firmware/export/config/meizum6sp.h b/firmware/export/config/meizum6sp.h index 47f8cfe4cb..35dd84c589 100644 --- a/firmware/export/config/meizum6sp.h +++ b/firmware/export/config/meizum6sp.h @@ -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 */ diff --git a/firmware/export/config/mini2440.h b/firmware/export/config/mini2440.h index d05e76adba..b872b78f83 100644 --- a/firmware/export/config/mini2440.h +++ b/firmware/export/config/mini2440.h @@ -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 */ diff --git a/firmware/export/config/mpiohd200.h b/firmware/export/config/mpiohd200.h index ec5a0b3bef..b6539e3a44 100644 --- a/firmware/export/config/mpiohd200.h +++ b/firmware/export/config/mpiohd200.h @@ -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 diff --git a/firmware/export/config/mpiohd300.h b/firmware/export/config/mpiohd300.h index 79fa97cb03..7858672301 100644 --- a/firmware/export/config/mpiohd300.h +++ b/firmware/export/config/mpiohd300.h @@ -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 diff --git a/firmware/export/config/mrobe100.h b/firmware/export/config/mrobe100.h index dd1062b51b..c020bbc700 100644 --- a/firmware/export/config/mrobe100.h +++ b/firmware/export/config/mrobe100.h @@ -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 diff --git a/firmware/export/config/ondavx767.h b/firmware/export/config/ondavx767.h index c201284843..7499873537 100644 --- a/firmware/export/config/ondavx767.h +++ b/firmware/export/config/ondavx767.h @@ -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 */ diff --git a/firmware/export/config/rk27generic.h b/firmware/export/config/rk27generic.h index 9a4326358f..4d5f1b6c5c 100644 --- a/firmware/export/config/rk27generic.h +++ b/firmware/export/config/rk27generic.h @@ -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 */ diff --git a/firmware/export/config/samsungyh820.h b/firmware/export/config/samsungyh820.h index 2f60683a55..e7a4c9d307 100644 --- a/firmware/export/config/samsungyh820.h +++ b/firmware/export/config/samsungyh820.h @@ -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 diff --git a/firmware/export/config/samsungyh920.h b/firmware/export/config/samsungyh920.h index e64af8ff89..a5cb75ef43 100644 --- a/firmware/export/config/samsungyh920.h +++ b/firmware/export/config/samsungyh920.h @@ -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 diff --git a/firmware/export/config/samsungyh925.h b/firmware/export/config/samsungyh925.h index c397c8fee2..92604af135 100644 --- a/firmware/export/config/samsungyh925.h +++ b/firmware/export/config/samsungyh925.h @@ -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 diff --git a/firmware/export/config/samsungypr0.h b/firmware/export/config/samsungypr0.h index bed5a2f977..049caa01b6 100644 --- a/firmware/export/config/samsungypr0.h +++ b/firmware/export/config/samsungypr0.h @@ -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 */ diff --git a/firmware/export/config/samsungyps3.h b/firmware/export/config/samsungyps3.h index 93beb5c30d..ddfe176020 100644 --- a/firmware/export/config/samsungyps3.h +++ b/firmware/export/config/samsungyps3.h @@ -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 */ diff --git a/firmware/export/config/samsungypz5.h b/firmware/export/config/samsungypz5.h index 651ae21ba3..b1f382e042 100644 --- a/firmware/export/config/samsungypz5.h +++ b/firmware/export/config/samsungypz5.h @@ -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 */ diff --git a/firmware/export/config/sansac100.h b/firmware/export/config/sansac100.h index cb28768684..109977ed06 100644 --- a/firmware/export/config/sansac100.h +++ b/firmware/export/config/sansac100.h @@ -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*/ diff --git a/firmware/export/config/sansac200.h b/firmware/export/config/sansac200.h index 1ee3d124d8..c3fd2d05e0 100644 --- a/firmware/export/config/sansac200.h +++ b/firmware/export/config/sansac200.h @@ -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 */ diff --git a/firmware/export/config/sansac200v2.h b/firmware/export/config/sansac200v2.h index 9779e98a0c..2d611240f2 100644 --- a/firmware/export/config/sansac200v2.h +++ b/firmware/export/config/sansac200v2.h @@ -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 */ diff --git a/firmware/export/config/sansaclip.h b/firmware/export/config/sansaclip.h index cc84ef3336..6070a6efaa 100644 --- a/firmware/export/config/sansaclip.h +++ b/firmware/export/config/sansaclip.h @@ -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 diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h index 31337f0831..0bdf82dce4 100644 --- a/firmware/export/config/sansaclipplus.h +++ b/firmware/export/config/sansaclipplus.h @@ -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 diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h index a95418f134..a8ccebcf7a 100644 --- a/firmware/export/config/sansaclipv2.h +++ b/firmware/export/config/sansaclipv2.h @@ -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 diff --git a/firmware/export/config/sansaclipzip.h b/firmware/export/config/sansaclipzip.h index c3d0b49068..eaf51d961b 100644 --- a/firmware/export/config/sansaclipzip.h +++ b/firmware/export/config/sansaclipzip.h @@ -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 diff --git a/firmware/export/config/sansaconnect.h b/firmware/export/config/sansaconnect.h index ad575e2d43..9e6be6cbee 100644 --- a/firmware/export/config/sansaconnect.h +++ b/firmware/export/config/sansaconnect.h @@ -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 */ diff --git a/firmware/export/config/sansae200.h b/firmware/export/config/sansae200.h index 9d2deb99ce..296416a91e 100644 --- a/firmware/export/config/sansae200.h +++ b/firmware/export/config/sansae200.h @@ -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 */ diff --git a/firmware/export/config/sansae200v2.h b/firmware/export/config/sansae200v2.h index ee63c0b393..c703439e7f 100644 --- a/firmware/export/config/sansae200v2.h +++ b/firmware/export/config/sansae200v2.h @@ -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 */ diff --git a/firmware/export/config/sansafuze.h b/firmware/export/config/sansafuze.h index e697cedaf7..c03106e4c3 100644 --- a/firmware/export/config/sansafuze.h +++ b/firmware/export/config/sansafuze.h @@ -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 */ diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h index 2457da8566..369e798528 100644 --- a/firmware/export/config/sansafuzeplus.h +++ b/firmware/export/config/sansafuzeplus.h @@ -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 */ diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h index e559647443..beb18d92c7 100644 --- a/firmware/export/config/sansafuzev2.h +++ b/firmware/export/config/sansafuzev2.h @@ -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 */ diff --git a/firmware/export/config/sansam200.h b/firmware/export/config/sansam200.h index 378f79ba2b..fa4a129e26 100644 --- a/firmware/export/config/sansam200.h +++ b/firmware/export/config/sansam200.h @@ -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 diff --git a/firmware/export/config/sansam200v4.h b/firmware/export/config/sansam200v4.h index ecf3494c7f..f6b2ebc006 100644 --- a/firmware/export/config/sansam200v4.h +++ b/firmware/export/config/sansam200v4.h @@ -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 diff --git a/firmware/export/config/sansaview.h b/firmware/export/config/sansaview.h index 2bf76927f4..d2fd679895 100644 --- a/firmware/export/config/sansaview.h +++ b/firmware/export/config/sansaview.h @@ -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 */ diff --git a/firmware/export/config/sonynwze360.h b/firmware/export/config/sonynwze360.h index ddb197950d..685391d5f9 100644 --- a/firmware/export/config/sonynwze360.h +++ b/firmware/export/config/sonynwze360.h @@ -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 */ diff --git a/firmware/export/config/sonynwze370.h b/firmware/export/config/sonynwze370.h index 412200a4ce..053d103f2e 100644 --- a/firmware/export/config/sonynwze370.h +++ b/firmware/export/config/sonynwze370.h @@ -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 */ diff --git a/firmware/export/config/tatungtpj1022.h b/firmware/export/config/tatungtpj1022.h index eb75b1ce61..7c25039f9f 100644 --- a/firmware/export/config/tatungtpj1022.h +++ b/firmware/export/config/tatungtpj1022.h @@ -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 diff --git a/firmware/export/config/vibe500.h b/firmware/export/config/vibe500.h index 29f8da995c..96b5321e66 100644 --- a/firmware/export/config/vibe500.h +++ b/firmware/export/config/vibe500.h @@ -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 */ diff --git a/firmware/export/config/zenvisionm30gb.h b/firmware/export/config/zenvisionm30gb.h index 4062dbf644..73d852433b 100644 --- a/firmware/export/config/zenvisionm30gb.h +++ b/firmware/export/config/zenvisionm30gb.h @@ -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 */ diff --git a/firmware/export/config/zenvisionm60gb.h b/firmware/export/config/zenvisionm60gb.h index 2400adac20..d1bd91154b 100644 --- a/firmware/export/config/zenvisionm60gb.h +++ b/firmware/export/config/zenvisionm60gb.h @@ -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 */ diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 386ac5a8bf..b72989fdb5 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -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__ */ -- cgit v1.2.3