Dependents:
hello
SerialTestv11
SerialTestv12
Sierpinski
... more
4 comments:
I think either an error or the dump variable are fine. NC guards in GPIO shouldn't slow it down alot, but it is something, and personally I would prefer avoiding that as much as possible.
It seems to me that defining a pin as NC should not throw an error nor crash the application. There are several examples of code where a pin is optional and has a default value of NC in the header file. Take for example the 'Backlight = BL' parameter in the LCD constructor above. Obviously, you should not call a method to activate the backlight when the pin has not been defined and the code will/might crash when you do it anyway, but it would not make sense when you are not able to use NC and you are always forced to define/waste a pin for a display that does not even have a backlight.
FYI I just made a pull request which at least brings back the old behavior: Pins with NC can still be constructed, when trying to write it still crashes, but it doesn't try to write in the constructor anymore. Not perfect, but this could be added easily in the common code without giving a performance penalty, and at least it brings back the old behavior.
Hello,
This should be fixed soon. I am closing it as Erik already fixed part of it and the second part will come. Thanks for understanding.
I think either an error or the dump variable are fine. NC guards in GPIO shouldn't slow it down alot, but it is something, and personally I would prefer avoiding that as much as possible.