Skip to content

Commit

Permalink
Limit function availability to tested boards
Browse files Browse the repository at this point in the history
  • Loading branch information
BRTFTW committed Sep 15, 2023
1 parent 9da4da4 commit cd2e0f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions AS5600.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ AS5600::AS5600(TwoWire *wire)
}


#if defined (ESP8266) || defined(ESP32) || defined(STM32)

bool AS5600::begin(int dataPin, int clockPin, uint8_t directionPin)
{
_directionPin = directionPin;
Expand All @@ -76,6 +78,8 @@ bool AS5600::begin(int dataPin, int clockPin, uint8_t directionPin)
return true;
}

#endif


bool AS5600::begin(uint8_t directionPin)
{
Expand Down
5 changes: 3 additions & 2 deletions AS5600.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ class AS5600
{
public:
AS5600(TwoWire *wire = &Wire);


#if defined (ESP8266) || defined(ESP32) || defined(STM32)
// AS5600_SW_DIRECTION_PIN is software controlled direction pin
bool begin(int dataPin, int clockPin, uint8_t directionPin = AS5600_SW_DIRECTION_PIN);

#endif
bool begin(uint8_t directionPin = AS5600_SW_DIRECTION_PIN);
bool isConnected();

Expand Down

0 comments on commit cd2e0f3

Please sign in to comment.