Hi

We had developed an device, that uses a subset of SD/MMC commands, and
are now in the process of writing the device driver for it in winCE
5.0. Now in the SDcardDDK there are only 4 types of devices whose
functionality is ported

// enum for device type
typedef enum _SDCARD_DEVICE_TYPE {
Device_Unknown = 0,
Device_MMC = 1,
Device_SD_Memory = 2,
Device_SD_IO = 3,
Device_SD_Combo = 4 // combo is only an intermediate device type
reserved only for the bus driver
}SDCARD_DEVICE_TYPE, *PSDCARD_DEVICE_TYPE;

I had read in many articles and the winCE help that usually the bus
driver is not touched and only the HOST controller driver or client
driver are modified according to the device requirements. Now I want
to add a fifth type of device, and hence change the implementation of
the SD Bus driver to accommodate my specific device type. Also our
device can support a large sized card. i.e 32 bit addresses wont cut
it for us. Which means that the Bus driver as well as the SDCardDDK
will have to be modified.

Now what is confusing me is how to package the modified bus driver.
The packaging of the client driver and HC driver is straightforward.
But for the SD bus driver, should i create a new msi installer, which
will patch the original SD bus driver code and appropriate header
files, or should I create a completely new catalog item (e.g
SDModifiedBus driver) with a separate source folder.

I want to know if anyone has any experience of changing the bus driver
according to their needs. and if yes how was it packaged in the form
of a catalog item or msi Installer.

Thanks


Mutahir Latif

Re: A new device type for SD/MMC card winCE by anand

anand
Tue Apr 10 03:30:57 CDT 2007

It is recommanded from Microsoft that don't alter the Shared Source
code. But sometime due to number of reasons we have to tailored it
according to our need.
According to my view The best way to solve your problem is go and
modified the SD bus driver. you can also include youre own header file
or else define one extra type of your device in the typedef structure
of SD Card device type. And then according to your need you just add
the funcinality which must be supported by your device.
So by doing this the this new SD bus driver will not break for other
SD card.
The only pain in doing this is that you have to do everytime "Build
and Sysgen" whenever you want to reflect the change you have done in
your SD bus Driver code. As Sygen will only build the final SDBus.dll
after creating it's library.

The idea of creating a new catolg item for (e.g SDModifiedBus driver)
is also sonds good and very profesonial but i think the main problem
will be when you will integrate the new catlog with the existing SDbus
driver. i.e. proper design will be required so that it won't effect
others card funcinality. Go for this approach if you have a clear idea
about this.



On Apr 5, 4:39 pm, "Tashi" <mutahirla...@gmail.com> wrote:
> Hi
>
> We had developed an device, that uses a subset of SD/MMC commands, and
> are now in the process of writing the device driver for it in winCE
> 5.0. Now in the SDcardDDK there are only 4 types of devices whose
> functionality is ported
>
> // enum for device type
> typedef enum _SDCARD_DEVICE_TYPE {
> Device_Unknown = 0,
> Device_MMC = 1,
> Device_SD_Memory = 2,
> Device_SD_IO = 3,
> Device_SD_Combo = 4 // combo is only an intermediate device type
> reserved only for the bus driver
>
> }SDCARD_DEVICE_TYPE, *PSDCARD_DEVICE_TYPE;
>
> I had read in many articles and the winCE help that usually the bus
> driver is not touched and only the HOST controller driver or client
> driver are modified according to the device requirements. Now I want
> to add a fifth type of device, and hence change the implementation of
> the SD Bus driver to accommodate my specific device type. Also our
> device can support a large sized card. i.e 32 bit addresses wont cut
> it for us. Which means that the Bus driver as well as the SDCardDDK
> will have to be modified.
>
> Now what is confusing me is how to package the modified bus driver.
> The packaging of the client driver and HC driver is straightforward.
> But for the SD bus driver, should i create a new msi installer, which
> will patch the original SD bus driver code and appropriate header
> files, or should I create a completely new catalog item (e.g
> SDModifiedBus driver) with a separate source folder.
>
> I want to know if anyone has any experience of changing the bus driver
> according to their needs. and if yes how was it packaged in the form
> of a catalog item or msi Installer.
>
> Thanks
>
> Mutahir Latif



Re: A new device type for SD/MMC card winCE by Dean

Dean
Tue Apr 10 08:15:15 CDT 2007

Don't do this. Clone the component first (copy it into your BSP) and then
modify the cloned version as needed. There is no reason to modify the code
in the public tree, ever.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"anand" <anand.krs@gmail.com> wrote in message
news:1176193857.877645.103880@n59g2000hsh.googlegroups.com...
> It is recommanded from Microsoft that don't alter the Shared Source
> code. But sometime due to number of reasons we have to tailored it
> according to our need.
> According to my view The best way to solve your problem is go and
> modified the SD bus driver. you can also include youre own header file
> or else define one extra type of your device in the typedef structure
> of SD Card device type. And then according to your need you just add
> the funcinality which must be supported by your device.
> So by doing this the this new SD bus driver will not break for other
> SD card.
> The only pain in doing this is that you have to do everytime "Build
> and Sysgen" whenever you want to reflect the change you have done in
> your SD bus Driver code. As Sygen will only build the final SDBus.dll
> after creating it's library.
>
> The idea of creating a new catolg item for (e.g SDModifiedBus driver)
> is also sonds good and very profesonial but i think the main problem
> will be when you will integrate the new catlog with the existing SDbus
> driver. i.e. proper design will be required so that it won't effect
> others card funcinality. Go for this approach if you have a clear idea
> about this.
>
>
>
> On Apr 5, 4:39 pm, "Tashi" <mutahirla...@gmail.com> wrote:
>> Hi
>>
>> We had developed an device, that uses a subset of SD/MMC commands, and
>> are now in the process of writing the device driver for it in winCE
>> 5.0. Now in the SDcardDDK there are only 4 types of devices whose
>> functionality is ported
>>
>> // enum for device type
>> typedef enum _SDCARD_DEVICE_TYPE {
>> Device_Unknown = 0,
>> Device_MMC = 1,
>> Device_SD_Memory = 2,
>> Device_SD_IO = 3,
>> Device_SD_Combo = 4 // combo is only an intermediate device type
>> reserved only for the bus driver
>>
>> }SDCARD_DEVICE_TYPE, *PSDCARD_DEVICE_TYPE;
>>
>> I had read in many articles and the winCE help that usually the bus
>> driver is not touched and only the HOST controller driver or client
>> driver are modified according to the device requirements. Now I want
>> to add a fifth type of device, and hence change the implementation of
>> the SD Bus driver to accommodate my specific device type. Also our
>> device can support a large sized card. i.e 32 bit addresses wont cut
>> it for us. Which means that the Bus driver as well as the SDCardDDK
>> will have to be modified.
>>
>> Now what is confusing me is how to package the modified bus driver.
>> The packaging of the client driver and HC driver is straightforward.
>> But for the SD bus driver, should i create a new msi installer, which
>> will patch the original SD bus driver code and appropriate header
>> files, or should I create a completely new catalog item (e.g
>> SDModifiedBus driver) with a separate source folder.
>>
>> I want to know if anyone has any experience of changing the bus driver
>> according to their needs. and if yes how was it packaged in the form
>> of a catalog item or msi Installer.
>>
>> Thanks
>>
>> Mutahir Latif
>
>