Tuesday, November 1, 2011

WinCE Shortcut to Control Panel Applet

A recently invoked query on the MSDN news group for Windows CE has induced me to script this post. Most of our WinCE guys might be aware of creating a shortcut for a file. Now a simple question – Is it possible to create a short-cut to each and every individual control panel application? The answer is YES, it’s possible and quite enthusiastic too.See the below given link for more details...
http://www.e-consystems.com/blog/windowsce/?p=378

Customizing Power Manager for SetSystemPowerState()

Changing the system state can be as simple as a cup of tea! by calling SetSystemPowerstate() API. But not all power states can be allowed to set through this API in the default cases. For example setting to “SystemIdle” using this API will be failed.
There are some use cases, we may need to set “systemIdle” through our application/driver or we may need to deny the application/driver to set some power states.  Sometimes, we would like to have our own power state created and it may be allowed to set from the application/driver.  To do this, we have to customize the Windows CE power manager.

Creating an effective image viewer in Windows CE

There are some cases where we may need to develop a DLL or application to show the images on the devices. For example, an Image viewer will be needed to show the picture after taking a snap shot from the camera using a direct show camera application. Windows CE supports Imaging APIs to handle the various file types like JPG, BMP, TIFF and GIF etc…
http://www.e-consystems.com/blog/windowsce/?p=221 

Handling Real Time Tasks in Windows CE

There are certain use cases – we may have to handle the non-standard custom interface to communicate between the processor and the hardware. An example is controlling the brightness of an LCD. The brightness controller is interfaced with the processor in a single GPIO pin. Communication will happen by just toggling the GPIO at a constant rate through software driver.
Since Windows CE is a multi-threading OS, task switching will happen between multiple threads. This task switching may prevent your driver to maintain the constant rate of GPIO toggling. This leads to malfunction. See more details on the following link...

Sharing I2C bus between OAL RTC part and Driver part on Windows CE

Real Time Clock or RTC is an essential component in all embedded systems. Designers interface these RTC chips through a common I2C bus shared by a lot of peripherals and sensors. Therefore a common I2C bus driver is needed to the developers.Since an I2C interface is a shared bus, synchronization is needed between the devices to access the I2C bus. Windows CE supports synchronization objects like critical sections, semaphore and mutex etc.., to share the device or bus in driver level without conflict. But RTC related functionalities are implemented in the OAL.exe. Therefore it is not possible to use synchronization objects in the OAL part. This blog depicts – how to share I2C bus between OAL and driver without conflict.
http://www.e-consystems.com/blog/windowsce/?p=121

Reload the Power Manager activity timeout upon every booting in Hive based Registry

Power management is an important aspect of the modern embedded devices. Flexibility in the OS Power Manager is the key driver to meet the requirements of myriad of devices. Windows CE offers this flexibility, though developer has to do a quick tweak to use it effectively. This blog describes the power manager in Windows CE, problem faced and how to overcome it.
http://www.e-consystems.com/blog/windowsce/?p=112

How to remove Pop-up windows in Kiosk mode


Windows CE is a customizable OS and custom application has been executed on the top of the OS. Majority of the customers won’t prefer to use the windows CE standard utilities embed on the control panel. Instead they develop their own applications using the standard APIs. During these cases, customer won’t like the standard utility windows popping up on the top of their application. See the below given link for more details...

Workaround for Suspend using core idle or ring Oscillator Mode in PXA320

e-con systems encourages his engineers to publish blogs on Windows CE in his blog website. From this blog onwards I am publishing my blogs on e-con systems Windows CE blog website and provide the links here.

Power Management is one of the crucial aspects of the handheld design. In various handhelds, the power management states and transition to these states without losing the operating context is the key to effective implementation of Power Management. The design decision of device power states, individual module power states in each of the power states, trigger sources configuration for each state etc are very important steps in the design stage. The design stage also involves the incorporation of the device power stages in to Windows CE Power Management framework.
This blog describes one interesting problem encountered in PXA320 CPU power modes in a Windows CE based design.Link the URL for more details about this blog.

http://www.e-consystems.com/blog/windowsce/?p=66

Tuesday, September 22, 2009

How to open a Windows CE stream device with the Index number greater than ten

Many Windows CE devices contain multiple peripherals. Some peripherals will be accessed through windows CE native drivers and the remaining peripherals will be accessed through stream drivers. A typical example of native driver is display driver and a typical example of stream driver is serial port. Stream driver is a simple, also powerful architecture and it is extremely flexible to develop a driver for any kind of devices. Serial port driver, bus drivers and custom device drivers are the typical examples for the stream driver.
We can take a serial port driver as an example to explain this blog. Devices like POS terminals need several serial ports to connect the peripherals like GPS, GSM Modem, IR devices, Magnetic card readers etc. In some cases, we need virtual serial port to access devices. We assume a POS terminal contains more than ten serial ports. This blogs explains you – how to access the serial port with the Index number greater than 10.
Opening a serial port device with an index number less than 10
Normally a combination of three letter prefix with the index number alone used to open the serial port driver. For example “COM3” is the name space used to open the serial port with the index 3. Following code snippet explains you to open the serial port with the index 3.
HANDLE hPort;
hPort = CreateFile(TEXT("COM3:"), GENERIC_READ GENERIC_WRITE, 0,NULL, OPEN_EXISTING, 0, NULL);
This method supports to open a serial port with the index less than 10. Index1-9 represents the first nine serial ports and index 0 represents the 10th serial port. This method is called as legacy naming convention.
Opening a serial port device with an index number greater than 10
We need to add a device string in front of the above mentioned notation to open a serial port with the index greater than 10. Following code snippet explains you to open the serial port with the index 20.
HANDLE hport;
hPort = CreateFile(TEXT("\$device\COM20"), GENERIC_READ GENERIC_WRITE, 0,NULL, OPEN_EXISTING, 0, NULL);
This method supports to open a serial port with any index from 0. This means, we can also open the index 3 with this method.