o/~ Talking to myself in public... o/~

On Wed, 12 May 2021 17:22:04 -0400, in gmane.comp.hardware.beagleboard.user
Dennis Lee Bieber <[email protected]>
wrote:

        I'd strongly recommend editing this and doing whatever needs to be done
to rebuild the PXL library (if it doesn't just compile from sources
everytime) OR...

>procedure TSysfsGPIO.ExportPin(const Pin: TPinIdentifier);
>begin
>  TryWriteTextToFile(FExportFileName, IntToStr(Pin));

    Sleep(1000);                        <<<<<

>  SetPinBit(Pin, ExportedBitmask);
>end;               

... modifying the source program (for test: Blinky) to explicitly export
pins and delay before trying to do anything with them...

"""
begin
  GPIO := TSysfsGPIO.Create;

  GPIO.ExportPin(PinLED);               <<<<<<<<
  Sleep(1000);                          <<<<<<<<

  try
    // Switch LED pin for output.
    GPIO.PinMode[PinLED] := TPinMode.Output;

    WriteLn('Blinking LED, press any key to exit...');
"""

        Modifying the library (and fine-tuning the sleep duration to the
minimum that is reliable) should ensure that any implicit pin export works
safely. Modifying the application source, OTOH, means if one exports ALL
NEEDED pins at the start, only one sleep would suffice for the batch,
rather than getting a sleep on each implicit export.

        ***     WORRY ABOUT SPI AFTER THE GPIO PROBLEM IS SOLVED        ***



-- 
Dennis L Bieber

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/nriq9ghfakl67f0tdb9mm6qdqriiiundg6%404ax.com.

Reply via email to