MT_GetVoltage

■Description

Get power supply voltage value.

■Synopsis

int MT_GetVoltage(int fd,PVOLTAGE pvol)

■Argument

int fd
  Please specify handle acquired by MT_Open function.

PVOLTAGE pvol
  Specify a pointer to the structure storing the power supply voltage value.
  If the function succeeds, the voltage data [mv] is stored in this structure.
  The PVOLTAGE structure is as follows.

    typedef struct {
        long	lVCore;
        long	lV33;
        long	lV5;
        long	lV12;
        long	lVM12;
        long	lVM5;
        long	lV5SB;
        long	lVBat;
        long	lV1_5;
        long	lV1_8;
        long	lV1_05;
        long	lV3VSB;
        long	lVExt[15];
    } VOLTAGE, *PVOLTAGE;

The voltage data in the table below is stored for each member variable.
The voltage that can be acquired depends on the model. 0x80000000 is stored in the variable for models that do not support it.

Member variable Information to be stored Compatible models
BX-220D BX-830 BX-956S BX-320 PT-956S BX-825 BX-T1000 CPS-BXC200 BX-U200 BX-T210 PT-V10/15WB BX-M1500 BX-M2500 BX-T3000 PT-M1xSA-210
lVCore core voltage[mv] ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
lV33 3.3V supply voltage[mv] ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
lV5 5V supply voltage[mv] ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
lV12 12V supply voltage[mv] × × ○ × ○ × ○ × × ○ × ○ ○ ○ ○
lVM12 Reserved - - - - - - - - - - - - - - -
lVM5 Reserved - - - - - - - - - - - - - - -
lV5SB 5V stand-by voltage[mv] ○ ○ × ○ × ○ ○ ○ × × ○ ○ ○ ○ ×
lVbatt battery volatage[mv] ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
lV1_5 1.5V supply voltage[mv] × × × × × × × × × × × × × × ×
lV1_8 1.8V supply voltage[mv] ○ ○ ○ ○ ○ × × × × ○ × × × ○ ○
lV1_05 1.05V supply voltage[mv] × × × × × × × × × × × × × × ×
lV3VSB 3V stand-by voltage[mv] ○ ○ ○ ○ ○ ○ ○ ○ × ○ ○ ○ ○ ○ ○
lVExt[15] Reserved - - - - - *1 - *1 *2 - *1 - *3 *3 -
*1. In BX-825, CPS-BXC200 and PT-V10WB, CPU_VNN voltage-value[mv] is stored in lVExt[0]. *2. In BX-U200, DCVCC voltage-value[mv] is stored in lVExt[0]. *3. In BX-M2500 and BX-T3000, AVCC voltage-value[mv] is stored in lVExt[0].

■RETURN VALUE

If the function succeeds, NO_ERROR is returned.
Voltage values are stored according to the model of pvol.
If the function fails, a code other than NO_ERROR is returned.
The other errors : Error code details



Function List