Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions module/cores/arduino/port_sam/core_digital.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ void pinMode( uint32_t ulPin, PinMode ulMode )

if ( (ulMode == INPUT) || (ulMode == INPUT_PULLUP) || (ulMode == INPUT_PULLDOWN) )
{
/* if all pins are OUTPUT, enable PIO Controller clocking */
if ( Ports[g_aPinMap[ulPin].iPort].pGPIO->PIO_OSR == 0xffffffff )
{
/* check if PIO is already clocked */
if (!(PMC->PMC_PCSR0 & (1 << Ports[g_aPinMap[ulPin].iPort].ulId)))
{
// if (Ports[g_aPinMap[ulPin].iPort].ulId < 32)
{
PMC->PMC_PCER0 = 1 << Ports[g_aPinMap[ulPin].iPort].ulId;
Expand Down