Intro:
When use HIVE Base in Wince , the system will keep the registry in the flash forever till format flash.
If we want to do the clean boot which to reset the registry to factory default , what should we do ?
1. only format HIVE registry block in flash
2. use OEMIoCtl and IOCTL_HAL_GET_HIVE_CLEAN
OALIoCtlGetHiveCleanFlag() function
2.1 Use HW button to dectect if clean HIVE registry
2.2 Use AP to set flag in reserve memory between bootloader and Ap
Ref:
http://www.vczx.com/article/show.php?id=1948
http://blog.csdn.net/slyzhang/archive/2006/08/10/1046951.aspx
http://www.yuanma.org/data/2006/0823/article_1393.htm
2007年6月28日 星期四
2007年5月25日 星期五
Bluetooth control Ap
Sample in \WINCE500\PUBLIC\COMMON\OAK\DRIVERS\BLUETOOTH\SAMPLE\BTLOADER\
Code examples for Bluetooth ON/OFF
ON:
{
HANDLE hDev =
CreateFile(
L"BTD0:", GENERIC_READ GENERIC_WRITE,
FILE_SHARE_READ FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0, NULL);
DWORD ictl = IOCTL_SERVICE_START;
if (hDev == INVALID_HANDLE_VALUE)
return;
WCHAR *argPtr = L"card";
DeviceIoControl(hDev, ictl, argPtr, sizeof(WCHAR) * (wcslen (argPtr) + 1), NULL, NULL, NULL, NULL);
CloseHandle (hDev);
}
OFF:
{
HANDLE hDev =
CreateFile(L"BTD0:",
GENERIC_READ GENERIC_WRITE,
FILE_SHARE_READ FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
DWORD ictl = IOCTL_SERVICE_STOP;
INT nBtStatus = 0;
if (hDev == INVALID_HANDLE_VALUE)
return;
WCHAR *argPtr = L"card";
DeviceIoControl(hDev, ictl, argPtr, sizeof(WCHAR) * (wcslen (argPtr) + 1), NULL, NULL, NULL, NULL);
CloseHandle(hDev);
}
Code examples for Bluetooth ON/OFF
ON:
{
HANDLE hDev =
CreateFile(
L"BTD0:", GENERIC_READ GENERIC_WRITE,
FILE_SHARE_READ FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0, NULL);
DWORD ictl = IOCTL_SERVICE_START;
if (hDev == INVALID_HANDLE_VALUE)
return;
WCHAR *argPtr = L"card";
DeviceIoControl(hDev, ictl, argPtr, sizeof(WCHAR) * (wcslen (argPtr) + 1), NULL, NULL, NULL, NULL);
CloseHandle (hDev);
}
OFF:
{
HANDLE hDev =
CreateFile(L"BTD0:",
GENERIC_READ GENERIC_WRITE,
FILE_SHARE_READ FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
DWORD ictl = IOCTL_SERVICE_STOP;
INT nBtStatus = 0;
if (hDev == INVALID_HANDLE_VALUE)
return;
WCHAR *argPtr = L"card";
DeviceIoControl(hDev, ictl, argPtr, sizeof(WCHAR) * (wcslen (argPtr) + 1), NULL, NULL, NULL, NULL);
CloseHandle(hDev);
}
2007年5月23日 星期三
WinCE 5.0 BSP Migrate to 6.0 note
BSP Migration Guide
In Windows Embedded CE 6.0, the kernel and OEM code are divided into the following three components:
1.Oal.exe
2.Kernel.dll
Microsoft recommends that OEMs move KITL support out of the OAL and into Kitl.dll. All Microsoft sample board support packages (BSPs) will follow this model.
The goals for this design are to:
In Windows Embedded CE 6.0, the kernel and OEM code are divided into the following three components:
1.Oal.exe
- This contains the startup code and the OEM adaptation layer (OAL) implementation.
- This component was previously named Kern.exe.
2.Kernel.dll
- This contains the OAL-independent kernel implementation.
3.Kitl.dll
- This contains the platform-specific KITL support.
Microsoft recommends that OEMs move KITL support out of the OAL and into Kitl.dll. All Microsoft sample board support packages (BSPs) will follow this model.
The goals for this design are to:
- Minimize OAL changes
- Clearly define the functions that the OAL can and cannot use
- Provide version information between components to provide forward compatibility
This model provides the following advantages:
- Allows Microsoft to update the kernel for retail devices without going through the OEM because the kernel is no longer dependent on the OAL.
- Simplifies the debugging process with an instrumented kernel. You only need to include a new instrumented Kernel.dll into the release directory and then re-make the run-time image.
- Provides OEMs with a binary-only version of the platform, which they can give to their customers.
- Makes loadable KITL possible. (I don`t understand)
- Enables all communication between the OEM code and the kernel to take place through well-defined interfaces.
BSP Migration Scenarios
- Scenario 1: Separate kernel, OAL, and KITL
- http://msdn2.microsoft.com/en-us/library/aa908403.aspx
- Scenario 2: Separate kernel and OAL(less effor)
- http://msdn2.microsoft.com/en-us/library/aa915383.aspx
Common.bib and the Make Run-Time Image (MakeImg) process require the following names:
- Oal.exe, use this to rename Kern.exe
- OalKitl.exe, use this to rename KernKitl.exe
訂閱:
文章 (Atom)