SAmeis / pascalio

Input/Output library for Raspberry Pi or any other Linux based microcontroller
Other
30 stars 9 forks source link

Timing Issue when creating Pin #3

Closed UweKullmann closed 4 years ago

UweKullmann commented 10 years ago

Class has a timing issue when creating a pin. if you try to change direction direct after creating the pin, nothing happens. Reason: The Costructor is exporting GPIOPin. The Kernel now need some time, this is the reason why direction file not exists. the result is a timing issue. Setdirection is trying to write into a file which is not existing, yet. One solution could be a sleep which seems not useful. Maybe a checkroutine in Cunstructor to check exported folder would be a solution. KR Uwe

SAmeis commented 4 years ago

There is now a a check with a customizable delay of 20 ms in unit fpsysfs. Please check fpSysFS.ExportCheckDelay and fpSysFS.CheckExported. Commit: ee3cb68beed62aff17591c7b490a650b4e58340f