COM iMX25 WinCE: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
Ageisreiter (talk | contribs)
No edit summary
Ageisreiter (talk | contribs)
Line 29: Line 29:


== DHHalLib (function library) ==
== DHHalLib (function library) ==
=== Version numbers ===
:'''Read DHHalLib version'''
:{| class="wikitable"
|''<code> unsigned long DHHalLibGetVersion() </code>''
|}
:Return value: <code>unsigned long</code> --> version number (e.g. 0x01040001 for version 1.4.0.1)
:'''BSP version'''
:{| class="wikitable"
|''<code> unsigned long BSPGetVersion() </code>''
|}
:Return value: <code>unsigned long</code> --> version number (e.g. 0x01040001 for version 1.4.0.1)
:Note: The version number information is stored in the following registry key: <code>[HKEY_LOCAL_MACHINE\Ident] dword:"BSPVersionNumber"</code>
:'''Read image version'''
:{| class="wikitable"
|''<code> unsigned long WinCEImageGetVersion() </code>''
|}
:Return value: <code>unsigned long</code> --> version number (e.g. 0x01040001 for version 1.4.0.1)
=== I2C ===
:'''Read'''
:{| class="wikitable"
|''<code> bool I2CRead( unsigned char cI2CPort, unsigned char cDevId, unsigned char cI2CReg, bool bSendStop, unsigned char *pOutBuffer) </code>''
|}
:Input values:
::<code>unsigned char cI2CPort</code> = DHCOM I2C port number (1.. 2)
::<code>unsigned char iDevId</code> = I2C device address (0..127)
::<code>unsigned char iI2CReg</code> = I2C device register address (0..255)
::<code>bool bSendStop</code> = send or not send stop bit at the end of the transfer (true --> stop bit is generated)
::<code>unsigned char *pOutBuffer</code> = Pointer to the read byte
:Return value: <code>bool</code> --> true = success; false = failed
:'''Write'''
:{| class="wikitable"
|''<code> bool I2CWrite( unsigned char cI2CPort, unsigned char cDevId, unsigned char cI2CReg, unsigned char cValue, bool bSendStop) </code>''
|}
:Input values:
::<code>unsigned char cI2CPort</code> = DHCOM I2C port number (1.. 2)
::<code>unsigned char iDevId</code> = I2C device address (0..127)
::<code>unsigned char iI2CReg</code> = I2C device register address (0..255)
::<code>unsigned char iValue</code> = Value to be written
::<code>bool bSendStop</code> = send or not send stop bit at the end of the transfer (true --> stop bit is generated)
:Return value: <code>bool</code> --> true = success; false = failed
:'''Read multiple bytes'''
:{| class="wikitable"
|''<code> bool I2CReadMultipleBytes( unsigned char cI2CPort, unsigned char cDevId, unsigned char cI2CReg, unsigned char cBytes, bool bSendStop, unsigned char *pOutBuffer) </code>''
|}
:Input values:
::<code>unsigned char cI2CPort</code> = DHCOM I2C port number (1.. 2)
::<code>unsigned char iDevId</code> = I2C device address (0..127)
::<code>unsigned char iI2CReg</code> = I2C device register address (0..255)
::<code>unsigned char cBytes</code> = Number of bytes to be read (max. 255)
::<code>bool bSendStop</code> = send or not send stop bit at the end of the transfer (true  stop bit is generated)
::<code>unsigned char *pOutBuffer</code> = Pointer to the read buffer
:Return value: <code>bool</code> --> true = success; false = failed
:'''Write multiple bytes'''
:{| class="wikitable"
|''<code> bool I2CWriteMultipleBytes( unsigned char cI2CPort, unsigned char cDevId, unsigned char cI2CReg, unsigned char cBytes, bool bSendStop, unsigned char *pInBuffer)</code>''
|}
:Input values:
::<code>unsigned char cI2CPort</code> = DHCOM I2C port number (1.. 2)
::<code>unsigned char iDevId</code> = I2C device address (0..127)
::<code>unsigned char iI2CReg</code> = I2C device register address (0..255)
::<code>unsigned char cBytes</code> = Number of bytes to be written (max. 255)
::<code>bool bSendStop</code> = send or not send stop bit at the end of the transfer (true  stop bit is generated)
::<code>unsigned char *pInBuffer</code> = Pointer to the input buffer
:Return value: <code>bool</code> --> true = success; false = failed
:'''Bus scan'''
:{| class="wikitable"
|''<code> bool I2CProbe(unsigned char cI2CPort, unsigned char cDevId)</code>''
|}
:Description:
::Scans the bus for the specified device address. Is this achievable, then the function returns "true".
:Input values:
::<code>unsigned char cI2CPort</code> = DHCOM I2C port number (1.. 2)
::<code>unsigned char iDevId</code> = I2C device address (0..127)
:Return value: <code>bool</code> --> true = success; false = failed

Revision as of 11:50, 12 November 2012

FAQ

Q: How long does it take to start WinCE from MicroSD Card?
A: Start time is depending on the image size. With normal image size of 10MByte (nk.gz file) it takes roughly 18 up to 20 seconds to boot WinCE.
Q: How long does it take to start WinCE from NAND flash?
A: Start time is depending on the image size. With normal image size of 10MByte (nk.gz file) it takes roughly 16 up to 18 seconds to boot WinCE.

Registry Settings

LCD Controller

[HKEY_LOCAL_MACHINE\Drivers\Display\LCDC]
  "PanelType"=dword:1    ; LCD Panel identifier 
                         ; Description: Set "PanelType" = 0 to use the bootloader LCD controller settings, which can be programmed to NAND Flash via settings.bin file.
[HKEY_LOCAL_MACHINE\SYSTEM\GDI\ROTATION]
  "Angle"=dword:0        ; no rotation
                         ; "Angle"=dword:5A --> 90 degrees rotated clockwise
                         ; "Angle"=dword:B4 --> 180 degrees rotated clockwise
                         ; "Angle"=dword:10E --> 270 degrees rotated clockwise

Task Bar Look

[HKEY_LOCAL_MACHINE\Explorer]
  “QVGA“=dword:00000001  ; Change Task bar style: 0 --> normal Windows look, 1 --> PDA look

NAND Flash (FlashDisk) base address

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\NAND_Flash]
  “FlashDiskBaseAddress“=dword:02000000  ; Configures the WinCE NAND FlashDisk Base address

DHHalLib (function library)

Version numbers

Read DHHalLib version
unsigned long DHHalLibGetVersion()
Return value: unsigned long --> version number (e.g. 0x01040001 for version 1.4.0.1)
BSP version
unsigned long BSPGetVersion()
Return value: unsigned long --> version number (e.g. 0x01040001 for version 1.4.0.1)
Note: The version number information is stored in the following registry key: [HKEY_LOCAL_MACHINE\Ident] dword:"BSPVersionNumber"
Read image version
unsigned long WinCEImageGetVersion()
Return value: unsigned long --> version number (e.g. 0x01040001 for version 1.4.0.1)

I2C

Read
bool I2CRead( unsigned char cI2CPort, unsigned char cDevId, unsigned char cI2CReg, bool bSendStop, unsigned char *pOutBuffer)
Input values:
unsigned char cI2CPort = DHCOM I2C port number (1.. 2)
unsigned char iDevId = I2C device address (0..127)
unsigned char iI2CReg = I2C device register address (0..255)
bool bSendStop = send or not send stop bit at the end of the transfer (true --> stop bit is generated)
unsigned char *pOutBuffer = Pointer to the read byte
Return value: bool --> true = success; false = failed
Write
bool I2CWrite( unsigned char cI2CPort, unsigned char cDevId, unsigned char cI2CReg, unsigned char cValue, bool bSendStop)
Input values:
unsigned char cI2CPort = DHCOM I2C port number (1.. 2)
unsigned char iDevId = I2C device address (0..127)
unsigned char iI2CReg = I2C device register address (0..255)
unsigned char iValue = Value to be written
bool bSendStop = send or not send stop bit at the end of the transfer (true --> stop bit is generated)
Return value: bool --> true = success; false = failed
Read multiple bytes
bool I2CReadMultipleBytes( unsigned char cI2CPort, unsigned char cDevId, unsigned char cI2CReg, unsigned char cBytes, bool bSendStop, unsigned char *pOutBuffer)
Input values:
unsigned char cI2CPort = DHCOM I2C port number (1.. 2)
unsigned char iDevId = I2C device address (0..127)
unsigned char iI2CReg = I2C device register address (0..255)
unsigned char cBytes = Number of bytes to be read (max. 255)
bool bSendStop = send or not send stop bit at the end of the transfer (true  stop bit is generated)
unsigned char *pOutBuffer = Pointer to the read buffer
Return value: bool --> true = success; false = failed
Write multiple bytes
bool I2CWriteMultipleBytes( unsigned char cI2CPort, unsigned char cDevId, unsigned char cI2CReg, unsigned char cBytes, bool bSendStop, unsigned char *pInBuffer)
Input values:
unsigned char cI2CPort = DHCOM I2C port number (1.. 2)
unsigned char iDevId = I2C device address (0..127)
unsigned char iI2CReg = I2C device register address (0..255)
unsigned char cBytes = Number of bytes to be written (max. 255)
bool bSendStop = send or not send stop bit at the end of the transfer (true  stop bit is generated)
unsigned char *pInBuffer = Pointer to the input buffer
Return value: bool --> true = success; false = failed
Bus scan
bool I2CProbe(unsigned char cI2CPort, unsigned char cDevId)
Description:
Scans the bus for the specified device address. Is this achievable, then the function returns "true".
Input values:
unsigned char cI2CPort = DHCOM I2C port number (1.. 2)
unsigned char iDevId = I2C device address (0..127)
Return value: bool --> true = success; false = failed