Skip to content

Commit

Permalink
Revert SAMD-specific platform adjustments
Browse files Browse the repository at this point in the history
Borrowed these tweaks from Encoder and they don't seem to be working... reverting to the 'typical' setup without any weird offsets & changes to see if it works better.
  • Loading branch information
dmadison committed Oct 28, 2020
1 parent 54a211a commit 7a68ac3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ServoInput_Platforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
#elif defined(__SAMD21G18A__) // Arduino MKR boards, Arm Cortex-M0 SAMD21

#define IO_REG_TYPE uint32_t
#define PIN_TO_BASEREG(pin) portModeRegister(digitalPinToPort(pin))
#define PIN_TO_BASEREG(pin) (portInputRegister(digitalPinToPort(pin)))
#define PIN_TO_BITMASK(pin) (digitalPinToBitMask(pin))
#define DIRECT_PIN_READ(base, mask) (((*((base)+8)) & (mask)) ? 1 : 0)
#define DIRECT_PIN_READ(base, mask) (((*(base)) & (mask)) ? 1 : 0)

#else
#error "The ServoInput library does not support this board (platform). Please create a feature request here: https://github.com/dmadison/ServoInput/"
Expand Down

0 comments on commit 7a68ac3

Please sign in to comment.