MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / begin

Method begin

libraries/AS5600/AS5600.cpp:59–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58#if defined (ESP8266) || defined(ESP32)
59bool AS5600::begin(int dataPin, int clockPin, uint8_t directionPin)
60{
61 _directionPin = directionPin;
62 if (_directionPin != 255)
63 {
64 pinMode(_directionPin, OUTPUT);
65 }
66 setDirection(AS5600_CLOCK_WISE);
67
68 _wire = &Wire;
69 if ((dataPin < 255) && (clockPin < 255))
70 {
71 _wire->begin(dataPin, clockPin);
72 } else {
73 _wire->begin();
74 }
75 if (! isConnected()) return false;
76 return true;
77}
78#endif
79
80

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36