Skip to content

Commit

Permalink
modify DigitalRead
Browse files Browse the repository at this point in the history
  • Loading branch information
anydream committed Sep 8, 2015
1 parent 00d0401 commit 60f8af2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
5 changes: 4 additions & 1 deletion TurboSPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ class DigitalPin
void High();
void Low();

int DigitalRead();
int DigitalRead()
{
return digitalRead(m_Pin);
}

void AnalogWrite(int val)
{
Expand Down
5 changes: 0 additions & 5 deletions TurboSPI_AVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,4 @@ void DigitalPin::Low()
*m_Port &= ~m_Mask;
}

int DigitalPin::DigitalRead()
{
return (*m_Port & m_Mask) ? HIGH : LOW;
}

#endif // __AVR__
5 changes: 0 additions & 5 deletions TurboSPI_SAM3X.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,4 @@ void DigitalPin::Low()
m_Port->PIO_CODR |= m_Mask;
}

int DigitalPin::DigitalRead()
{
return digitalRead(m_Pin);
}

#endif // defined(__SAM3X8E__) || defined(__SAM3X8H__)

0 comments on commit 60f8af2

Please sign in to comment.