This repository has been archived on 2025-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
android-g900/Start_WM/test6/inc/GFOption.h
2010-10-16 00:02:07 +06:00

141 lines
4.5 KiB
C
Executable File

/* Copyright (c) 2006 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
* and any modifications thereto. Any use, reproduction, disclosure or
* distribution of this software and related documentation without an
* express license agreement from NVIDIA Corporation is strictly prohibited.
*/
/** @file GFOption.h
GFSDK (Compile-time) Option header file.
Contains user level options and selected compile-time options.
*/
#ifndef __GFOPTION_H__
#define __GFOPTION_H__
#include "cpuopsys.h"
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
/***************************************************************************
* Hardware Dependent Options and Compile-time selections
***************************************************************************/
/** @name Device ID options and compile-time selection
@anchor DeviceIDs
#GF_DEVICE_ID_DEFAULT option is for selecting any ID.
@{*/
#define GF_DEVICE_ID_DEFAULT 0x0000
#define GF_DEVICE_ID_SC11 0x0011
#define GF_DEVICE_ID_SC15 0x0015
#define GF_DEVICE_ID_SC14 0x0014
#ifndef GF_DEVICE_ID
#define GF_DEVICE_ID GF_DEVICE_ID_SC15
// Primary chip id
#endif /* GF_DEVICE_ID */
#define GF_DEVICE_ID_MASK 0x0000FFFF
#define GF_DEVICE_ID_SHIFT 0
#define GF_DEVICE_ID_VALUE( val ) \
(((val) >> GF_DEVICE_ID_SHIFT) & GF_DEVICE_ID_MASK)
/*@}*/
/** @name Device Revision options and compile-time selection
@anchor DeviceRevisions
#GF_DEVICE_REV_DEFAULT is for selecting any revision.
Always use 16bit when referring Device Revision only.
@{*/
#define GF_REV_A1 0x00A1
#define GF_REV_A2 0x00A2
#define GF_REV_A3 0x00A3
#define GF_REV_A4 0x00A4
#define GF_DEVICE_REV_DEFAULT 0x0000
#ifndef GF_DEVICE_REV
#define GF_DEVICE_REV GF_DEVICE_REV_DEFAULT
//!< Primary chip revision
#endif /* GF_DEVICE_REV */
#define GF_DEVICE_REV_MASK 0x0000FFFF
#define GF_DEVICE_REV_SHIFT 16
#define GF_DEVICE_REV_VALUE( val ) \
(((val) >> GF_DEVICE_REV_SHIFT) & GF_DEVICE_REV_MASK)
/*@}*/
#if defined(NVCPU_XTENSA)
// On DSP, we always use direct addressing.
#define GF_DEVICE_ADDRESS_DEFAULT GF_DEVICE_ADDRESS_DIRECT
#define GF_DEVICE_ADDRESS GF_DEVICE_ADDRESS_DIRECT
#else
// On host CPU, direct & indirect addressing are available in runtime. Default
// is direct addressing.
#ifndef GF_DEVICE_ADDRESS_DEFAULT
#define GF_DEVICE_ADDRESS_DEFAULT GF_DEVICE_ADDRESS_DIRECT
#endif /* GF_DEVICE_ADDRESS_DEFAULT */
#ifndef GF_DEVICE_ADDRESS
#define GF_DEVICE_ADDRESS ( GF_DEVICE_ADDRESS_DIRECT \
| GF_DEVICE_ADDRESS_INDIRECT16 \
| GF_DEVICE_ADDRESS_INDIRECT8 \
| GF_DEVICE_ADDRESS_INDIRECT32)
#endif /* GF_DEVICE_ADDRESS */
#endif
/***************************************************************************
* Operating system Dependent Options
***************************************************************************/
/* The bootloader has already initialized the chip and display. To avoid
* writing the hardware again (which can cause screen flicker and other
* symptoms that the customer doesn't like), define this variable to 1.
*/
#ifndef GF_BOOTLOADER_PRESENT
#define GF_BOOTLOADER_PRESENT 0
#endif
// If we're compiling for the bootloader right now, of course the
// bootloader cannot be present
#ifdef GF_BOOT_LIB
#undef GF_BOOTLOADER_PRESENT
#define GF_BOOTLOADER_PRESENT 0
#endif
/**************************************************************************
* GFSDK Library Auto Compiler Options
* Attempts to set up enough options if none is specified by Build Project.
**************************************************************************/
// XXX We should get rid of NV_DEBUG, so we don't have both DEBUG and NV_DEBUG
#if defined(NV_WINDOWS) && !defined(NV_WINDOWS_CE)
#ifdef _DEBUG
#ifndef NV_DEBUG
#define NV_DEBUG 1
#endif
#endif
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GFOPTION_H__ */