Video library for GR-PEACH
Dependents: Trace_Program2 GR-PEACH_Camera_in_barcode GR-PEACH_LCD_sample GR-PEACH_LCD_4_3inch_sample ... more
Video library for GR-PEACH.
Hello World!
Import programGR-PEACH_Camera_in
Camera in sample for GR-PEACH. This sample works on GR-LYCHEE besides GR-PEACH.
API
Import library
Interface
See the Pinout page for more details
common/lcd_settings.c@0:853f5b7408a7, 2015-06-26 (annotated)
- Committer:
- dkato
- Date:
- Fri Jun 26 02:17:53 2015 +0000
- Revision:
- 0:853f5b7408a7
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dkato | 0:853f5b7408a7 | 1 | /******************************************************************************* |
dkato | 0:853f5b7408a7 | 2 | * DISCLAIMER |
dkato | 0:853f5b7408a7 | 3 | * This software is supplied by Renesas Electronics Corporation and is only |
dkato | 0:853f5b7408a7 | 4 | * intended for use with Renesas products. No other uses are authorized. This |
dkato | 0:853f5b7408a7 | 5 | * software is owned by Renesas Electronics Corporation and is protected under |
dkato | 0:853f5b7408a7 | 6 | * all applicable laws, including copyright laws. |
dkato | 0:853f5b7408a7 | 7 | * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING |
dkato | 0:853f5b7408a7 | 8 | * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT |
dkato | 0:853f5b7408a7 | 9 | * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE |
dkato | 0:853f5b7408a7 | 10 | * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. |
dkato | 0:853f5b7408a7 | 11 | * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS |
dkato | 0:853f5b7408a7 | 12 | * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE |
dkato | 0:853f5b7408a7 | 13 | * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR |
dkato | 0:853f5b7408a7 | 14 | * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE |
dkato | 0:853f5b7408a7 | 15 | * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
dkato | 0:853f5b7408a7 | 16 | * Renesas reserves the right, without notice, to make changes to this software |
dkato | 0:853f5b7408a7 | 17 | * and to discontinue the availability of this software. By using this software, |
dkato | 0:853f5b7408a7 | 18 | * you agree to the additional terms and conditions found by accessing the |
dkato | 0:853f5b7408a7 | 19 | * following link: |
dkato | 0:853f5b7408a7 | 20 | * http://www.renesas.com/disclaimer |
dkato | 0:853f5b7408a7 | 21 | * Copyright (C) 2012 - 2015 Renesas Electronics Corporation. All rights reserved. |
dkato | 0:853f5b7408a7 | 22 | *******************************************************************************/ |
dkato | 0:853f5b7408a7 | 23 | /**************************************************************************//** |
dkato | 0:853f5b7408a7 | 24 | * @file lcd_settings.c |
dkato | 0:853f5b7408a7 | 25 | * @version 1.00 |
dkato | 0:853f5b7408a7 | 26 | * $Rev: 199 $ |
dkato | 0:853f5b7408a7 | 27 | * $Date:: 2014-05-23 16:33:52 +0900#$ |
dkato | 0:853f5b7408a7 | 28 | * @brief VDC5 driver LCD panel settings sample |
dkato | 0:853f5b7408a7 | 29 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 30 | |
dkato | 0:853f5b7408a7 | 31 | /****************************************************************************** |
dkato | 0:853f5b7408a7 | 32 | Includes <System Includes> , "Project Includes" |
dkato | 0:853f5b7408a7 | 33 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 34 | #include <string.h> |
dkato | 0:853f5b7408a7 | 35 | |
dkato | 0:853f5b7408a7 | 36 | #include "r_typedefs.h" |
dkato | 0:853f5b7408a7 | 37 | |
dkato | 0:853f5b7408a7 | 38 | #include "r_vdc5.h" |
dkato | 0:853f5b7408a7 | 39 | |
dkato | 0:853f5b7408a7 | 40 | #include "iodefine.h" |
dkato | 0:853f5b7408a7 | 41 | #include "lcd_panel.h" |
dkato | 0:853f5b7408a7 | 42 | |
dkato | 0:853f5b7408a7 | 43 | |
dkato | 0:853f5b7408a7 | 44 | /****************************************************************************** |
dkato | 0:853f5b7408a7 | 45 | Macro definitions |
dkato | 0:853f5b7408a7 | 46 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 47 | #define LVDSPLL_TST (16u) /* LVDSPLL_TST (LVDS PLL internal parameters) */ |
dkato | 0:853f5b7408a7 | 48 | |
dkato | 0:853f5b7408a7 | 49 | /****************************************************************************** |
dkato | 0:853f5b7408a7 | 50 | Typedef definitions |
dkato | 0:853f5b7408a7 | 51 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 52 | |
dkato | 0:853f5b7408a7 | 53 | /****************************************************************************** |
dkato | 0:853f5b7408a7 | 54 | Imported global variables and functions (from other files) |
dkato | 0:853f5b7408a7 | 55 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 56 | |
dkato | 0:853f5b7408a7 | 57 | /****************************************************************************** |
dkato | 0:853f5b7408a7 | 58 | Exported global variables (to be accessed by other files) |
dkato | 0:853f5b7408a7 | 59 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 60 | |
dkato | 0:853f5b7408a7 | 61 | /****************************************************************************** |
dkato | 0:853f5b7408a7 | 62 | Private global variables and functions |
dkato | 0:853f5b7408a7 | 63 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 64 | |
dkato | 0:853f5b7408a7 | 65 | /**************************************************************************//** |
dkato | 0:853f5b7408a7 | 66 | * @brief LCD panel I/O port setup |
dkato | 0:853f5b7408a7 | 67 | * @param[in] channel |
dkato | 0:853f5b7408a7 | 68 | * @retval None |
dkato | 0:853f5b7408a7 | 69 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 70 | void GRAPHICS_SetLcdPanel (const vdc5_channel_t channel) |
dkato | 0:853f5b7408a7 | 71 | { |
dkato | 0:853f5b7408a7 | 72 | if (channel == VDC5_CHANNEL_0) { |
dkato | 0:853f5b7408a7 | 73 | GRAPHICS_SetLcdPanel_Ch0(); |
dkato | 0:853f5b7408a7 | 74 | } else { |
dkato | 0:853f5b7408a7 | 75 | GRAPHICS_SetLcdPanel_Ch1(); |
dkato | 0:853f5b7408a7 | 76 | } |
dkato | 0:853f5b7408a7 | 77 | } /* End of function GRAPHICS_SetLcdPanel() */ |
dkato | 0:853f5b7408a7 | 78 | |
dkato | 0:853f5b7408a7 | 79 | /**************************************************************************//** |
dkato | 0:853f5b7408a7 | 80 | * @brief LCD TCON setup parameter acquisition processing |
dkato | 0:853f5b7408a7 | 81 | * @param[in] channel |
dkato | 0:853f5b7408a7 | 82 | * @param[out] outctrl : Address of the area for storing the LCD TCON timing setup data table |
dkato | 0:853f5b7408a7 | 83 | * @retval None |
dkato | 0:853f5b7408a7 | 84 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 85 | void GRAPHICS_SetLcdTconSettings (const vdc5_channel_t channel, const vdc5_lcd_tcon_timing_t * * const outctrl) |
dkato | 0:853f5b7408a7 | 86 | { |
dkato | 0:853f5b7408a7 | 87 | /* LCD TCON timing setting */ |
dkato | 0:853f5b7408a7 | 88 | if (channel == VDC5_CHANNEL_0) { |
dkato | 0:853f5b7408a7 | 89 | GRAPHICS_SetLcdTconSettings_Ch0(outctrl); |
dkato | 0:853f5b7408a7 | 90 | } else { |
dkato | 0:853f5b7408a7 | 91 | GRAPHICS_SetLcdTconSettings_Ch1(outctrl); |
dkato | 0:853f5b7408a7 | 92 | } |
dkato | 0:853f5b7408a7 | 93 | } /* End of function GRAPHICS_SetLcdTconSettings() */ |
dkato | 0:853f5b7408a7 | 94 | |
dkato | 0:853f5b7408a7 | 95 | /**************************************************************************//** |
dkato | 0:853f5b7408a7 | 96 | * @brief LVDS-related parameter acquisition processing |
dkato | 0:853f5b7408a7 | 97 | * @param[in] channel |
dkato | 0:853f5b7408a7 | 98 | * @retval Address of the area containing the LVDS-related parameters |
dkato | 0:853f5b7408a7 | 99 | ******************************************************************************/ |
dkato | 0:853f5b7408a7 | 100 | vdc5_lvds_t * GRAPHICS_GetLvdsParam (const vdc5_channel_t channel) |
dkato | 0:853f5b7408a7 | 101 | { |
dkato | 0:853f5b7408a7 | 102 | static vdc5_lvds_t lvds_param; |
dkato | 0:853f5b7408a7 | 103 | vdc5_lvds_t * p_lvds; |
dkato | 0:853f5b7408a7 | 104 | |
dkato | 0:853f5b7408a7 | 105 | p_lvds = (vdc5_lvds_t *)&lvds_param; |
dkato | 0:853f5b7408a7 | 106 | |
dkato | 0:853f5b7408a7 | 107 | if (channel == VDC5_CHANNEL_0) { |
dkato | 0:853f5b7408a7 | 108 | p_lvds = NULL; |
dkato | 0:853f5b7408a7 | 109 | } else { |
dkato | 0:853f5b7408a7 | 110 | p_lvds = NULL; |
dkato | 0:853f5b7408a7 | 111 | } |
dkato | 0:853f5b7408a7 | 112 | return p_lvds; |
dkato | 0:853f5b7408a7 | 113 | } /* End of function GRAPHICS_GetLvdsParam() */ |
dkato | 0:853f5b7408a7 | 114 |