Generic GHIElectronics.NETMF.FEZ.dll?

I own a Fez Mini and a Fez Panda II and I want to put classes I often use in a class library project.

My problem is that I must include a FEZMini_GHIElectronics.NETMF.FEZ.dll or FEZPanda_II_GHIElectronics.NETMF.FEZ.dll reference to use types as FEZ_Pin.Digital and then the library is usable only for one of the two boards.

In those classes, I never use something specific as [quote]FEZ_Pin.Digital.Di25[/quote] available on the Panda but not on the Mini, I only use something like [quote]FEZ_Pin.Digital pin[/quote] as a parameter.

Is there a way to avoid maintaining two different libraries with the same classes.

You do not need to include these DLLs at all. Instead, add your own class the provide pin numbers.

[quote]
In those classes, I never use something specific as
FEZ_Pin.Digital.Di25[/quote]
Then why do you need this DLL?

I know i can use Cpu.Pin as parameter type in a method but I prefer FEZ_Pin.Digital which is more clear and simpler to use. As FEZ_Pin.Digital is defined in the Mini or Panda dll, it is tied to one board.

Di2, for instance, is defined as 19 in FEZMini_GHIElectronics.NETMF.FEZ.dll and as 33 in FEZPanda_II_GHIElectronics.NETMF.FEZ.dll.

I could define MDi2 as 19 for Mini and PDi2 as 33 for Panda in the same enum type and I would know which one to use in a specific project.

It would help if I could get the source of the two dll (or some kind of list of the pin numbers for the two boards) to create a new FEZ_Pin.Digital type I can use with both boards. I guess I can always find on the schematic.

The pin number is printed on the silkscreen on your board, it doesn’t really directly relate to the hardware pin number.

You can always use #if’s

enum PIN
{
#if PANDA
DI2 = 19
#elif MINI
DI2 = 33
#endif
}

And then define it in your project properties when you are working with a particular board…