Daiki Kato / 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

LCD_shield_config.cpp

Committer:
dkato
Date:
2016-06-17
Revision:
0:e58ddcfa2ad9

File content as of revision 0:e58ddcfa2ad9:

#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;
}