# GX_SetPower

## Syntax

      #include <nitro/gx/gx.h>

      void GX_SetPower(int gxbit_power /* GXPower */ );

## Arguments

gxbit_power | Logical SUM of `GXPower` format values

## Return Values

None.

## Description

This function turns each graphics circuit ON/OFF. The `GX_POWER_LCD` function was eliminated. Use the `PM_SetLCDPower` function to manage power to the LCD.

`GX_POWER_OFF` | Specifies all graphics circuits OFF
`GX_POWER_2D` | Turns both the main and sub 2D graphics engines ON
`GX_POWER_3D` | Turns the geometry and rendering engines ON.
`GX_POWER_2D_MAIN` | Turns the main 2D graphics engine ON.
`GX_POWER_2D_SUB` | Turns the sub 2D graphics engine ON.
`GX_POWER_RE` | Turns the rendering engine ON.
`GX_POWER_GE` | Turns the geometry engine ON.
`GX_POWER_ALL` | Turns everything ON.

The following are `GXPower` format type definitions

    typedef enum
    {
        GX_POWER_OFF = 0,

        GX_POWER_2D_MAIN = 1 << REG_GX_POWCNT_E2DG_SHIFT,
        GX_POWER_2D_SUB  = 1 << REG_GX_POWCNT_E2DGB_SHIFT,

        GX_POWER_RE = 1 << REG_GX_POWCNT_RE_SHIFT,
        GX_POWER_GE = 1 << REG_GX_POWCNT_GE_SHIFT,

        GX_POWER_2D = GX_POWER_2D_MAIN | GX_POWER_2D_SUB,
        GX_POWER_3D = GX_POWER_RE | GX_POWER_GE,

        GX_POWER_ALL = GX_POWER_LCD | GX_POWER_2D | GX_POWER_3D
    }
    GXPower;

## See Also

`GX_GetPower`, `PM_SetLCDPower`

## Revision History

2004/08/10

- Deleted `GX_POWER_LCD`, `GX_POWER_LCD_TOP`, and `GX_POWER_LCD_BOT` for power control.

2004/02/09

- Added `GX_POWER_LCD_TOP`, `GX_POWER_LCD_BOT`, `GX_POWER_2D_MAIN`, `GX_POWER_2D_SUB`, and `GX_POWER_3D` for power control.

2004/01/19 Initial version.

CONFIDENTIAL