Skip to content

Added function setClock on bus I2C #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cores/arduino/Stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ float Stream::parseFloat(char skipChar){
bool isNegative = false;
bool isFraction = false;
long value = 0;
char c;
int c;
float fraction = 1.0;

c = peekNextDigit();
Expand Down
7 changes: 7 additions & 0 deletions libraries/Wire/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,19 @@ void TwoWire::begin(uint8_t address) {
sercom->enableWIRE();
}

<<<<<<< HEAD
void TwoWire::setClock(uint32_t baudrate) {
sercom->disableWIRE();
sercom->initMasterWIRE(baudrate);
sercom->enableWIRE();
=======
void TwoWire::end() {
sercom->disableWIRE();
}

void TwoWire::setClock(uint32_t frequency) {
// dummy funtion
>>>>>>> arduino/master
}

uint8_t TwoWire::requestFrom(uint8_t address, size_t quantity, bool stopBit)
Expand Down
4 changes: 4 additions & 0 deletions libraries/Wire/Wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ class TwoWire : public Stream
TwoWire(SERCOM *s, uint8_t pinSDA, uint8_t pinSCL);
void begin();
void begin(uint8_t);
<<<<<<< HEAD
void setClock(uint32_t);
=======
void end();
void setClock(uint32_t); // dummy function
>>>>>>> arduino/master

void beginTransmission(uint8_t);
uint8_t endTransmission(bool stopBit);
Expand Down