Skip to content
10 changes: 9 additions & 1 deletion Source/MBF.SAMCD.GPIO.pas
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,15 @@ TArduinoPin = record
A4 = TNativePin.PA5; A5 = TNativePin.PB2;
end;
{$endif}
{$if defined(SAMD20XPRO) or defined(SAMD21XPRO) }
{$if defined(SAMD20XPRO)}
type
TArduinoPin = record
const
None=-1;
D13= TNativePin.PA14; // just for blinky to work
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the right way to do things. Better define a const LED (and LED0) with value TNativePin.PA14.
You should not 'kill' the ArduinoPins Definition for the sake of making Blinky run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fully agreed.
But the current Blinky used this Arduino-pin, and the board itself has no Arduino pins.
Please correct me if I am wrong.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a look here:

http://www.microchip.com/DevelopmentTools/ProductDetails/atardadpt-xpro

The shield is a little difficult to find when you do not know what to search for

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha !
Did not know of this adapter-board !
Nice addition.
Surely, the Arduino pin-definitions must be included.

end;
{$endif}
{$if defined(SAMD21XPRO) }
// Arduino Pins via AtmelXPlained Shield Adapter
type
TArduinoPin = record
Expand Down
2 changes: 2 additions & 0 deletions Source/MBF.SAMCD.SystemCore.pas
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ procedure WaitSYSCTRL;
SYSCTRL_DFLLCTRL_QLDIS; // 1 = Disable quick lock.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

{$else}
SYSCTRL_DFLLCTRL_CCDIS OR
{$ifdef has_usb}
SYSCTRL_DFLLCTRL_USBCRM OR //* USB correction */
{$endif}
SYSCTRL_DFLLCTRL_BPLCKC;
{$endif}
WaitSYSCTRL;
Expand Down