GR-PEACH LCD Shield config
Dependencies: LcdCfg_LCD_shield TouchKey_LCD_shield
Dependents: GR-PEACH_LCD_shield_touch_sample mbed-os_Watson-IoT_ZXing_sample mbed-os_Watson-IoT_ZXing_sample GR-PEACH_SprintGame ... more
Revision 0:e58ddcfa2ad9, committed 2016-06-17
- Comitter:
- dkato
- Date:
- Fri Jun 17 12:14:45 2016 +0000
- Child:
- 1:b230ec751c56
- Commit message:
- first commit
Changed in this revision
| LCD_shield_config.cpp | Show annotated file Show diff for this revision Revisions of this file |
| LCD_shield_config.h | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD_shield_config.cpp Fri Jun 17 12:14:45 2016 +0000
@@ -0,0 +1,55 @@
+#include "LCD_shield_config.h"
+
+#if (LCD_TYPE == 0)
+
+const DisplayBase::lcd_config_t lcd_shield_config = {
+ DisplayBase::LCD_TYPE_LVDS /* lcd_type */
+ , LCD_INPUT_CLOCK /* intputClock */
+ , LCD_OUTPUT_CLOCK /* outputClock */
+ , DisplayBase::LCD_OUTFORMAT_RGB888 /* lcd_outformat */
+ , DisplayBase::EDGE_RISING /* lcd_edge */
+ , (LCD_PIXEL_WIDTH + LCD_H_FRONT_PORCH + LCD_H_BACK_PORCH + LCD_H_SYNC_WIDTH) /* h_toatal_period */
+ , (LCD_PIXEL_HEIGHT + LCD_V_FRONT_PORCH + LCD_V_BACK_PORCH + LCD_V_SYNC_WIDTH) /* v_toatal_period */
+ , LCD_PIXEL_WIDTH /* h_disp_widht */
+ , LCD_PIXEL_HEIGHT /* v_disp_widht */
+ , LCD_H_BACK_PORCH /* h_back_porch */
+ , LCD_V_BACK_PORCH /* v_back_porch */
+ , DisplayBase::LCD_TCON_PIN_2 /* h_sync_port */
+ , DisplayBase::SIG_POL_NOT_INVERTED /* h_sync_port_polarity */
+ , LCD_H_SYNC_WIDTH /* h_sync_width */
+ , DisplayBase::LCD_TCON_PIN_0 /* v_sync_port */
+ , DisplayBase::SIG_POL_NOT_INVERTED /* v_sync_port_polarity */
+ , LCD_V_SYNC_WIDTH /* v_sync_width */
+ , DisplayBase::LCD_TCON_PIN_3 /* de_port */
+ , DisplayBase::SIG_POL_NOT_INVERTED /* de_port_polarity */
+};
+
+#else
+
+const DisplayBase::lcd_config_t lcd_shield_config = {
+ DisplayBase::LCD_TYPE_LVDS /* lcd_type */
+ , LCD_INPUT_CLOCK /* intputClock */
+ , LCD_OUTPUT_CLOCK /* outputClock */
+ , DisplayBase::LCD_OUTFORMAT_RGB888 /* lcd_outformat */
+ , DisplayBase::EDGE_RISING /* lcd_edge */
+ , (LCD_PIXEL_WIDTH + LCD_H_FRONT_PORCH + LCD_H_BACK_PORCH + LCD_H_SYNC_WIDTH) /* h_toatal_period */
+ , (LCD_PIXEL_HEIGHT + LCD_V_FRONT_PORCH + LCD_V_BACK_PORCH + LCD_V_SYNC_WIDTH) /* v_toatal_period */
+ , LCD_PIXEL_WIDTH /* h_disp_widht */
+ , LCD_PIXEL_HEIGHT /* v_disp_widht */
+ , (LCD_H_BACK_PORCH + LCD_H_SYNC_WIDTH) /* h_back_porch */
+ , (LCD_V_BACK_PORCH + LCD_V_SYNC_WIDTH) /* v_back_porch */
+ , DisplayBase::LCD_TCON_PIN_NON /* h_sync_port */
+ , DisplayBase::SIG_POL_NOT_INVERTED /* h_sync_port_polarity */
+ , 0 /* h_sync_width */
+ , DisplayBase::LCD_TCON_PIN_NON /* v_sync_port */
+ , DisplayBase::SIG_POL_NOT_INVERTED /* v_sync_port_polarity */
+ , 0 /* v_sync_width */
+ , DisplayBase::LCD_TCON_PIN_3 /* de_port */
+ , DisplayBase::SIG_POL_NOT_INVERTED /* de_port_polarity */
+};
+
+#endif
+
+void GetLcdConfig(DisplayBase::lcd_config_t * p_lcd_cfg) {
+ *p_lcd_cfg = lcd_shield_config;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LCD_shield_config.h Fri Jun 17 12:14:45 2016 +0000 @@ -0,0 +1,45 @@ + +#ifndef LCD_SHIELD_CONFIG_H +#define LCD_SHIELD_CONFIG_H + +#include "DisplayBace.h" +#include "TouchKey_LCD_4_3.h" +#include "TouchKey_LCD_7_1.h" + +/**** User Selection *********/ +#define LCD_TYPE (0) // 0: 4.3inch 1:7.1inch +/*****************************/ + +#if (LCD_TYPE == 0) + +/* LCD Parameter */ +#define LCD_INPUT_CLOCK (66.67) +#define LCD_OUTPUT_CLOCK (13.40f) +#define LCD_PIXEL_WIDTH (480u) +#define LCD_PIXEL_HEIGHT (272u) +#define LCD_H_BACK_PORCH (43u) +#define LCD_H_FRONT_PORCH (52u) +#define LCD_H_SYNC_WIDTH (41u) +#define LCD_V_BACK_PORCH (12u) +#define LCD_V_FRONT_PORCH (2u) +#define LCD_V_SYNC_WIDTH (10u) + +#else + +/* LCD Parameter */ +#define LCD_INPUT_CLOCK (66.67) +#define LCD_OUTPUT_CLOCK (33.26) +#define LCD_PIXEL_WIDTH (800u) +#define LCD_PIXEL_HEIGHT (480u) +#define LCD_H_BACK_PORCH (128u) +#define LCD_H_FRONT_PORCH (92u) +#define LCD_H_SYNC_WIDTH (36u) +#define LCD_V_BACK_PORCH (35u) +#define LCD_V_FRONT_PORCH (5u) +#define LCD_V_SYNC_WIDTH (5u) + +#endif + +extern void GetLcdConfig(DisplayBase::lcd_config_t * p_lcd_cfg); + +#endif