1

Closed

Remove pin reservations

description

When addressing the issue 526 (pin reservations should be undoable), we revised the rationale behind pin reservations and benefits it gives to the users and concluded that this functionality is no longer necessary.

The pin reservation is intended to prevent users connecting modules in a way that some of them needed to use the same CPU pins. When this happens, an exception is thrown at runtime telling the user that another module is already using the pin requested. This functionality was introduced before the designer was written - nowadays, the designer does the checking at design time and makes it impossible to connect modules so that the pin reservation process would kick in.

Moreover, the underlying .NET Micro Framework itself is doing pin reservations, so we are just duplicating this functionality for an error message with module name in it, for scenarios that we already consider advanced (building .NET Gadgeteer applications without the templates and the designer).

So, we can either add another code to the core (and each interface) to make the unresevations work as expected and support the pin sharing that the designer already handles, or we can just remove the functionality completely.

Given that every improvement in the footprint, memory and performance counts, I propose to drop pin reservations from the Gadgeteer core.
That would be for .NET Micro Framework 4.3 projects only. Existing projects using the designer would work just fine, hardware manufacturers would need to update constructors of their module drivers for 4.3.

I encourage anyone that would be unhappy with this change to comment below.
Closed Jul 26, 2013 at 10:57 AM by JanKuceraMSFT
Resolved in 2.43.800. Pin reservations no longer tracked, but still checked for GPIO use of RGB sockets.

comments

Cuno wrote Apr 25, 2013 at 12:06 PM

Good idea. Not unhappy at all.

gus_ghielec wrote Apr 27, 2013 at 2:55 PM

This is okay with us, especially that our mainboards very rarely share pins.

Gus - GHI electronics

wrote Jul 26, 2013 at 10:57 AM