Article updated
at 28 Oct 2017
Attention: this is a legacy library and thus not supported by Toradex anymore. We recommend that you use the new libraries for all Toradex modules. Please see the Toradex CE Libraries and Code Samples for up-to-date information.
Library to provide access to System Information. More...
struct
_PROCESSOR_INFOstruct
BB_RELOC
|
BOOL |
SysInfoLibInit (void) |
|
BOOL |
SysInfoLibDeInit (void) |
|
BOOL |
GetOSVersion (LPOSVERSIONINFO pOSInfo) |
|
BOOL |
GetImageInfo (BSPVER *pBspVer, SYSTEMTIME *pBspDate) |
|
BOOL |
GetBootloaderInfo (BSPVER *pBspVer, SYSTEMTIME *pBspDate) |
|
BOOL |
GetSystemSpeeds (DWORD *pCpuSpeed, DWORD *pRamSpeed, DWORD *pBusSpeed) |
|
BOOL |
GetProcessorInfo (PROCESSOR_INFO *pPI) |
|
BOOL |
GetBoardVersion (HWCFG *pHWVer) |
|
BOOL |
GetBoardSerial (DWORD *pSerial) |
|
BOOL |
GetMACAddress (BYTE *pMAC) |
|
BOOL |
SetMACAddress (BYTE *pMAC) |
|
DWORD |
GetFlashSize (DWORD *pFlashType) |
|
DWORD |
GetMemorySize (void) |
|
BOOL |
GetBBTable (BB_RELOC *reloc, DWORD *numReloc) |
|
DWORD |
SetFrequencyPXA270 (DWORD l, DWORD n, BOOL turbo, BOOL turbo2, BOOL fastBus, BOOL altmem, BOOL sram2) |
|
DWORD |
SetFrequencyPXA3xx (DWORD l, DWORD n, DWORD hsio, DWORD sram, DWORD staticMem) |
|
DWORD |
SetCoreVoltage (DWORD core_voltage) |
|
DWORD |
GetUserData (USERCFG *pUser) |
|
DWORD |
SaveUserData (USERCFG *pUser) |
|
void |
SILGetLibVersion (DWORD *pVerMaj, DWORD *pVerMin, DWORD *pBuild) |
|
Library to provide access to System Information.
- Copyright
- Copyright (c) 2012 Toradex AG
- Author:
- kia
- Rev:
- 2101
- Date:
- 2014-03-10 14:27:38 +0100 (Mo, 10 Mrz 2014)
- Target Platforms:
- PXAxxx, T20
BOOL GetBBTable |
( |
BB_RELOC * |
reloc, |
|
|
DWORD * |
numReloc |
|
) |
|
|
Get the bad block table
- Parameters
-
[out] |
reloc |
Pointer to Bad Block array |
[out] |
numReloc |
Number of Bad Block records |
- Return values
-
TRUE |
Success |
FALSE |
Failure |
BOOL GetBoardSerial |
( |
DWORD * |
pSerial |
) |
|
Get the board Serial Number
- Parameters
-
[out] |
pSerial |
Pointer to Serial Number data |
- Return values
-
TRUE |
Success |
FALSE |
Failure |
BOOL GetBoardVersion |
( |
HWCFG * |
pHWVer |
) |
|
Get the board Version and Product ID
- Parameters
-
[out] |
pHWVer |
Pointer to Board Version data structure |
- Return values
-
TRUE |
Success |
FALSE |
Failure |
BOOL GetBootloaderInfo |
( |
BSPVER * |
pBspVer, |
|
|
SYSTEMTIME * |
pBspDate |
|
) |
|
|
Updates the BSP Release Date
- Parameters
-
[in] |
pBspVer |
pointer to BSP version data structure |
|
IN/OUT] |
pBspDate pointer to BSP release date structure |
- Return values
-
TRUE |
Success |
FALSE |
Failure |
DWORD GetFlashSize |
( |
DWORD * |
pFlashType |
) |
|
Get the size of the Flash
- Parameters
-
[out] |
pFlashType |
Pointer to Flash Type data |
- Returns
- Size of the flash memory [in Bytes]
BOOL GetImageInfo |
( |
BSPVER * |
pBspVer, |
|
|
SYSTEMTIME * |
pBspDate |
|
) |
|
|
Check the BSP version and date are valid
- Parameters
-
[in] |
pBspVer |
Pointer to BSP version data structure |
[in] |
pBspDate |
Pointer to the BSP release date |
- Return values
-
TRUE |
Success |
FALSE |
Failure |
BOOL GetMACAddress |
( |
BYTE * |
pMAC |
) |
|
Get the MAC Address of the board
- Parameters
-
[out] |
pMAC |
Pointer to MAC Address data |
- Return values
-
TRUE |
Success |
FALSE |
Failure |
DWORD GetMemorySize |
( |
void |
|
) |
|
Get the RAM memory size
- Parameters
-
[out] |
pFlashType |
Pointer to Flash Type data |
- Returns
- Size of the RAM [in Bytes]
BOOL GetOSVersion |
( |
LPOSVERSIONINFO |
pOSInfo |
) |
|
get the Operating System version
- Parameters
-
[out] |
pOSInfo |
Pointer to OS Version Info Structure |
- Return values
-
TRUE |
Success |
FALSE |
Failure |
Get the Processor information - see PROCESSOR_INFO definition
- Parameters
-
[out] |
pPI |
Pointer to Processor Info data structure |
- Return values
-
TRUE |
Success |
FALSE |
Failure |
BOOL GetSystemSpeeds |
( |
DWORD * |
pCpuSpeed, |
|
|
DWORD * |
pRamSpeed, |
|
|
DWORD * |
pBusSpeed |
|
) |
|
|
Get the CPU, RAM and Bus speeds
- Parameters
-
[out] |
pCpuSpeed |
Pointer to CPU Speed [Hz] for PXA, [MHz] for Tegra |
[out] |
pRamSpeed |
Pointer to RAM Speed [Hz] for PXA, [MHz] for Tegra |
[out] |
pBusSpeed |
Pointer to Bus Speed [Hz] for PXA, [MHz] for Tegra |
- Return values
-
TRUE |
Success. This function always returns TRUE |
DWORD GetUserData |
( |
USERCFG * |
pUser |
) |
|
Get User Config Data
- Parameters
-
[out] |
pUser |
Pointer to User Config Data Structure |
- Returns
- Number of bytes read from flash. User Data is always 256 bytes.
DWORD SaveUserData |
( |
USERCFG * |
pUser |
) |
|
Set User Config data
- Parameters
-
[in] |
pUser |
Pointer to User Config Data Structure |
- Returns
- Number of bytes written to flash. User Data is always 256 bytes. 0 = failure
DWORD SetCoreVoltage |
( |
DWORD |
core_voltage |
) |
|
Set core voltage
- Parameters
-
[in] |
core_voltage |
New core voltage [in mV] |
- Returns
- Voltage set [in mV]
DWORD SetFrequencyPXA270 |
( |
DWORD |
l, |
|
|
DWORD |
n, |
|
|
BOOL |
turbo, |
|
|
BOOL |
turbo2, |
|
|
BOOL |
fastBus, |
|
|
BOOL |
altmem, |
|
|
BOOL |
sram2 |
|
) |
|
|
Set System Frequencies on PXA270
- Parameters
-
[in] |
l |
Run Mode to 13 Mhz processor Oscillator Ratio |
[in] |
n |
Turbo Mode to Run Mode Ratio |
[in] |
turbo |
Turbo Mode Enable |
[in] |
turbo2 |
Half-Turbo Mode Enable |
[in] |
fastbus |
Fast Bus Mode Enable |
[in] |
altmem |
Memory Controller Clock Alternate Setting Enable |
[in] |
sram2 |
SDRAM Clock Pin 1 Selector |
- Return values
-
0 |
No Error |
1 |
l<0 | l>30 |
2 |
n<0 | n>6 |
DWORD SetFrequencyPXA3xx |
( |
DWORD |
l, |
|
|
DWORD |
n, |
|
|
DWORD |
hsio, |
|
|
DWORD |
sram, |
|
|
DWORD |
staticMem |
|
) |
|
|
Set System Frequencies on PXA3xx
- Parameters
-
[in] |
l |
Core PLL Run-Mode-to-Oscillator Ratio |
[in] |
n |
Turbo Mode to Run Mode Ratio |
[in] |
hsio |
System Bus-Clock frequency Select |
[in] |
sram |
SRAM Fequency Select |
[in] |
staticMem |
Static Memory Controller Frequency Select |
- Return values
-
0 |
No Error |
1 |
l<8 | l>31 |
2 |
n<1 | n>2 |
3 |
hsio not matched |
4 |
sram not matched |
5 |
staticMem not matched |
BOOL SetMACAddress |
( |
BYTE * |
pMAC |
) |
|
Set the MAC Address of the board
- Parameters
-
[in] |
pMAC |
Pointer to MAC Address data |
- Return values
-
TRUE |
Success |
FALSE |
Failure |
void SILGetLibVersion |
( |
DWORD * |
pVerMaj, |
|
|
DWORD * |
pVerMin, |
|
|
DWORD * |
pBuild |
|
) |
|
|
Returns the library Version.
- Parameters
-
[out] |
pVerMaj |
Returns the major version number. Set this parameter to NULL if not required. |
[out] |
pVerMin |
Returns the minor version number. Set this parameter to NULL if not required. |
[out] |
pBuild |
Returns the build number. Set this parameter to NULL if not required. |
BOOL SysInfoLibDeInit |
( |
void |
|
) |
|
Frees the library - call this if you do not need the lbrary anymore.
- Return values
-
TRUE |
SysInfoLib is initialized |
FALSE |
SysInfoLib is de-initialized |
BOOL SysInfoLibInit |
( |
void |
|
) |
|
Initialise the library - call this before any other functions in tis library
- Return values
-
TRUE |
SysInfoLib is initialized |
FALSE |
SysInfoLib is de-initialized |