# PM_GetAmp

## C Specification

      #include <nitro/spi.h>

      u32 PM_GetAmp( PMAmpSwitch* swBuf );

## Arguments

swBuf | The buffer that saves the obtained results of the amp switch settings.

## Return Values

The `PM_RESULT_SUCCESS` return value indicates that the execution of the command has succeeded. The `PM_RESULT_ERROR` return value indicates that an error has occurred with the ARM7 processor.

## Description

Gets the current settings of the programmable gain amp switch.
The value of the `PMAmpSwitch` enumerator type is saved in the swBuf argument and can contain either one of the following values:

`PM_AMP_ON` | Amp is ON.
`PM_AMP_OFF` | Amp is OFF.

This function uses PXI to send the command that performs the corresponding operation in the ARM7 processor. The ARM7 side that receives that command is executed by operating the PMIC. Therefore, this function may not operate promptly after you call it. Before you use this function, initialize the PM library by using the `PM_Init()` function. The `PM_Init()` function has to be called only once. Also, when you call `OS_Init()`, there is no need to call `PM_Init()` separately since it is called from within `OS_Init()`.)

Note: If `PM_RESULT_ERROR` was returned as the return value, it is usually an unrecoverable error. It might be returned when ARM7 is not ready or the variable region was destroyed. If this is returned there may be a problem in the program.

## Internal Operation

Reads the PMIC register `OP_CTL` value.

## See Also

`PM_Init`, `PM_SetAmp*`

## Revision History

07/07/2005 Referred to the return value `PM_RESULT_ERROR`.
08/09/2004 Initial version.

CONFIDENTIAL