Graphics framework for GR-PEACH. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Dependents:   ImageZoomInout_Sample ImageRotaion_Sample ImageScroll_Sample GR-PEACH_LCD_4_3inch_Save_to_USB ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers clib_samples.c Source File

clib_samples.c

00001 /*******************************************************************************
00002 * DISCLAIMER
00003 * This software is supplied by Renesas Electronics Corporation and is only
00004 * intended for use with Renesas products. No other uses are authorized. This
00005 * software is owned by Renesas Electronics Corporation and is protected under
00006 * all applicable laws, including copyright laws.
00007 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
00008 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
00009 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
00010 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
00011 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
00012 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
00013 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
00014 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
00015 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
00016 * Renesas reserves the right, without notice, to make changes to this software
00017 * and to discontinue the availability of this software. By using this software,
00018 * you agree to the additional terms and conditions found by accessing the
00019 * following link:
00020 * http://www.renesas.com/disclaimer
00021 * Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
00022 *******************************************************************************/
00023 /******************************************************************************
00024 * $FileName: clib_samples.c $
00025 * $Module: CLibCommon $ $PublicVersion: 1.00 $ (=CLIB_VERSION)
00026 * $Rev: 52 $
00027 * $Date:: 2014-03-20 18:41:05 +0900#$
00028 * Description: Sample functions
00029 *******************************************************************************/
00030 
00031 
00032 /******************************************************************************
00033 Includes   <System Includes> , "Project Includes"
00034 *******************************************************************************/
00035 #include  "Project_Config.h"
00036 #include  "r_typedefs.h"
00037 #include  "r_ospl.h"
00038 #include  "clib_samples.h"
00039 #if ! IS_VDC_SAMPLE_VRAM_USED
00040 #include  "clib_samples_private.h"
00041 #endif
00042 
00043 
00044 /******************************************************************************
00045 Typedef definitions
00046 ******************************************************************************/
00047 
00048 /******************************************************************************
00049 Macro definitions
00050 ******************************************************************************/
00051 
00052 /******************************************************************************
00053 Imported global variables and functions (from other files)
00054 ******************************************************************************/
00055 
00056 /******************************************************************************
00057 Exported global variables and functions (to be accessed by other files)
00058 ******************************************************************************/
00059 
00060 /******************************************************************************
00061 Private global variables and functions
00062 ******************************************************************************/
00063 
00064 /******************************************************************************
00065 * Function Name: [R_Sample_GetBigMemory]
00066 * Description  :
00067 * Arguments    :
00068 * Return Value : Error code, 0=No error
00069 ******************************************************************************/
00070 errnum_t  R_Sample_GetBigMemory( uint8_t **const  out_Address,  size_t *const  out_Size )
00071 {
00072 #if IS_VDC_SAMPLE_VRAM_USED
00073     errnum_t          e;
00074     static uint8_t   *address;
00075     static size_t     memory_size;
00076 
00077     IF_DQ( out_Address == NULL ) {
00078         e=E_OTHERS;
00079         goto fin;
00080     }
00081     IF_DQ( out_Size    == NULL ) {
00082         e=E_OTHERS;
00083         goto fin;
00084     }
00085 
00086     if ( address == NULL ) {
00087         e= R_Sample_GetBigMemory_FromVDC_Sample( &address, &memory_size );
00088         IF(e!=0) {
00089             goto fin;
00090         }
00091     }
00092     *out_Address = address;
00093     *out_Size    = memory_size;
00094 
00095     e=0;
00096 fin:
00097     return  e;
00098 #else
00099     R_MEMORY_SECTION_GetMemory_ClibSamplesC( out_Address, out_Size );
00100     return  0;
00101 #endif
00102 }
00103 
00104