Skip to main content

Sys Info Lib API

danger

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...

Data Structures

struct  _PROCESSOR_INFO struct  BB_RELOC 

Macros

#define SIL_VER_MAJ   1
 See also SysInfoLibDemo. More...
 
#define SIL_VER_MIN   4
 
#define SIL_VER_BUILD   0
 
#define TYPE_NOR   0x01
 
#define TYPE_NAND   0x02
 

Typedefs

typedef struct _PROCESSOR_INFO PROCESSOR_INFO
 

Functions

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)
 

Detailed Description

Library to provide access to System Information.
Author:
kia
Rev:
2101
Date:
2014-03-10 14:27:38 +0100 (Mo, 10 Mrz 2014)
Target Platforms:
PXAxxx, T20

Macro Definition Documentation

#define SIL_VER_BUILD   0
 
#define SIL_VER_MAJ   1
See also SysInfoLibDemo.
#define SIL_VER_MIN   4
 
#define TYPE_NAND   0x02
 
#define TYPE_NOR   0x01
 

Typedef Documentation

Function Documentation

BOOL GetBBTable(BB_RELOCreloc,
  DWORD * numReloc 
 )  
Get the bad block table
Parameters
[out]relocPointer to Bad Block array
[out]numRelocNumber of Bad Block records
Return values
TRUESuccess
FALSEFailure
BOOL GetBoardSerial(DWORD * pSerial) 
Get the board Serial Number
Parameters
[out]pSerialPointer to Serial Number data
Return values
TRUESuccess
FALSEFailure
BOOL GetBoardVersion(HWCFG * pHWVer) 
Get the board Version and Product ID
Parameters
[out]pHWVerPointer to Board Version data structure
Return values
TRUESuccess
FALSEFailure
BOOL GetBootloaderInfo(BSPVER * pBspVer,
  SYSTEMTIME * pBspDate 
 )  
Updates the BSP Release Date
Parameters
[in]pBspVerpointer to BSP version data structure
 IN/OUT]pBspDate pointer to BSP release date structure
Return values
TRUESuccess
FALSEFailure
DWORD GetFlashSize(DWORD * pFlashType) 
Get the size of the Flash
Parameters
[out]pFlashTypePointer 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]pBspVerPointer to BSP version data structure
[in]pBspDatePointer to the BSP release date
Return values
TRUESuccess
FALSEFailure
BOOL GetMACAddress(BYTE * pMAC) 
Get the MAC Address of the board
Parameters
[out]pMACPointer to MAC Address data
Return values
TRUESuccess
FALSEFailure
DWORD GetMemorySize(void  ) 
Get the RAM memory size
Parameters
[out]pFlashTypePointer to Flash Type data
Returns
Size of the RAM [in Bytes]
BOOL GetOSVersion(LPOSVERSIONINFO pOSInfo) 
get the Operating System version
Parameters
[out]pOSInfoPointer to OS Version Info Structure
Return values
TRUESuccess
FALSEFailure
BOOL GetProcessorInfo(PROCESSOR_INFOpPI) 
Get the Processor information - see PROCESSOR_INFO definition
Parameters
[out]pPIPointer to Processor Info data structure
Return values
TRUESuccess
FALSEFailure
BOOL GetSystemSpeeds(DWORD * pCpuSpeed,
  DWORD * pRamSpeed,
  DWORD * pBusSpeed 
 )  
Get the CPU, RAM and Bus speeds
Parameters
[out]pCpuSpeedPointer to CPU Speed [Hz] for PXA, [MHz] for Tegra
[out]pRamSpeedPointer to RAM Speed [Hz] for PXA, [MHz] for Tegra
[out]pBusSpeedPointer to Bus Speed [Hz] for PXA, [MHz] for Tegra
Return values
TRUESuccess. This function always returns TRUE
DWORD GetUserData(USERCFG * pUser) 
Get User Config Data
Parameters
[out]pUserPointer 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]pUserPointer 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_voltageNew core voltage [in mV]
Returns
Voltage set [in mV]
Remarks
See also Colibri Tweak -> System Clocks
DWORD SetFrequencyPXA270(DWORD l,
  DWORD n,
  BOOL turbo,
  BOOL turbo2,
  BOOL fastBus,
  BOOL altmem,
  BOOL sram2 
 )  
Set System Frequencies on PXA270
Parameters
[in]lRun Mode to 13 Mhz processor Oscillator Ratio
[in]nTurbo Mode to Run Mode Ratio
[in]turboTurbo Mode Enable
[in]turbo2Half-Turbo Mode Enable
[in]fastbusFast Bus Mode Enable
[in]altmemMemory Controller Clock Alternate Setting Enable
[in]sram2SDRAM Clock Pin 1 Selector
Return values
0No Error
1l<0 | l>30
2n<0 | n>6
Remarks
See also Colibri Tweak -> System Clocks
DWORD SetFrequencyPXA3xx(DWORD l,
  DWORD n,
  DWORD hsio,
  DWORD sram,
  DWORD staticMem 
 )  
Set System Frequencies on PXA3xx
Parameters
[in]lCore PLL Run-Mode-to-Oscillator Ratio
[in]nTurbo Mode to Run Mode Ratio
[in]hsioSystem Bus-Clock frequency Select
[in]sramSRAM Fequency Select
[in]staticMemStatic Memory Controller Frequency Select
Return values
0No Error
1l<8 | l>31
2n<1 | n>2
3hsio not matched
4sram not matched
5staticMem not matched
Remarks
See also Colibri Tweak -> System Clocks
BOOL SetMACAddress(BYTE * pMAC) 
Set the MAC Address of the board
Parameters
[in]pMACPointer to MAC Address data
Return values
TRUESuccess
FALSEFailure
void SILGetLibVersion(DWORD * pVerMaj,
  DWORD * pVerMin,
  DWORD * pBuild 
 )  
Returns the library Version.
Parameters
[out]pVerMajReturns the major version number. Set this parameter to NULL if not required.
[out]pVerMinReturns the minor version number. Set this parameter to NULL if not required.
[out]pBuildReturns 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
TRUESysInfoLib is initialized
FALSESysInfoLib is de-initialized
BOOL SysInfoLibInit(void  ) 
Initialise the library - call this before any other functions in tis library
Return values
TRUESysInfoLib is initialized
FALSESysInfoLib is de-initialized


Send Feedback!