The FMD interface implementation file in Windows CE is linked to FAL. Lib.
Flash drivers in Windows CE are divided into two layers: FMD layer and FAL layer. FMD (Flash Media driver) is the underlying layer and directly operates flash hardware, different flash hardware implement different functions on the fmd_xxx interface, and the upper layer is the FAL (flash into action layer) layer, which is implemented and provided by Microsoft, is a hardware-independent layer. The FAL layer provides DSK interfaces to the application layer (such as APIS. For example, the device called in createfile is the interface provided by the FAL layer. The FMD layer exposes fmd_xxx for the FAL layer to call.
The FAL layer is linked in the form of FAL. Lib in Pb. If you want to implement a streaming Flash Driver, you cannot use the fmd_xxx implementation file to compile it into a DLL. You must link it with FAL. lib to become a usable driver.
The basic steps for developing a Flash Driver are as follows:
1. Implement the fmd_xxx function by programming. You can also use the sample driver provided by Microsoft under Pb.
2. Configure the. Def file and set the export function to dsk_xxx. XXX in dsk_xxx corresponds to XXX in fmd_xxx.
3. Set the source file. There are
Targetlibs = \
$ (_ Projectroot) \ cesysgen \ SDK \ Lib \ $ (_ cpuindpath) \ coredll. Lib \
$ (_ Winceroot) \ public \ common \ SDK \ Lib \ armv4i \ retail \ ceddk. Lib
And
Sourcelibs = \
$ (_ Winceroot) \ public \ common \ oak \ Lib \ armv4i \ retail \ FAL. Lib
4. Compile the link to generate the DLL file.
5. dumpbin/exports XXX. dll can be used to verify that the export function is correct.
6. Configure the registry and test the driver.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/redeg/archive/2008/09/26/2980149.aspx