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 ncg_register.c Source File

ncg_register.c

00001 /******************************************************************************
00002 * Copyright (c) 2010-2012 Renesas Electronics Corporation. All rights reserved.
00003 *
00004 * brief  : NCG register read/write Functions
00005 *
00006 * author : Renesas Electronics Corporation.
00007 *
00008 * history: 2013.06.25
00009 *          - Changed for RGAH
00010 *          2010.10.08
00011 *          - Created the initial code.
00012 *          2012.08.22
00013 *          - Updated coding format.
00014 *          2014.12.22
00015 *          - Applied to OSPL and RGA.
00016 *
00017 *******************************************************************************/
00018 
00019 /*=============================================================================
00020  * Includes
00021  */
00022 
00023 #include "Project_Config.h"
00024 #include "ncg_defs.h"
00025 #include "ncg_register.h"
00026 
00027 #ifdef  RGAH_VERSION
00028 
00029 /*=============================================================================
00030  * Internal definitions
00031  */
00032 
00033 
00034 /*=============================================================================
00035  *  Prototyping of internal functions
00036  */
00037 
00038 
00039 /*=============================================================================
00040  *  Private global variables and functions
00041  */
00042 
00043 
00044 /*=============================================================================
00045  *  Global Function
00046  */
00047 
00048 /*----------------------------------------------------------------------------
00049  NAME       : NCGSYS_ReadReg
00050  FUNCTION   : Read a hardware register.
00051  PARAMETERS : ui32RegBase : [IN ] Base address.
00052               ui32Offset  : [IN ] Address offset.
00053  RETURN     : Register value.
00054 ------------------------------------------------------------------------------*/
00055 NCGuint32
00056 NCGSYS_ReadReg (
00057     NCGuint32       ui32RegBase,
00058     NCGuint32       ui32Offset )
00059 {
00060     NCGuint32 ui32RegVal;
00061 
00062     ui32RegVal = *(((volatile NCGuint32 *)ui32RegBase) + (ui32Offset>>2));
00063 
00064     return ui32RegVal;
00065 }
00066 
00067 /*----------------------------------------------------------------------------
00068  NAME       : NCGSYS_WriteReg
00069  FUNCTION   : Write a hardware register.
00070  PARAMETERS : ui32RegBase : [IN ] Base address.
00071               ui32Offset  : [IN ] Address offset.
00072               ui32Value   : [IN ] Register value.
00073  RETURN     : None.
00074 ------------------------------------------------------------------------------*/
00075 NCGvoid
00076 NCGSYS_WriteReg (
00077     NCGuint32       ui32RegBase,
00078     NCGuint32       ui32Offset,
00079     NCGuint32       ui32Value )
00080 {
00081     *(((volatile NCGuint32 *)ui32RegBase) + (ui32Offset>>2)) = ui32Value;
00082 }
00083 
00084 #endif
00085 /* -- end of file -- */