Put fix from leaflabs into Wire.cpp to replace my fix, and added stub function for setClockDivider into SPI.cpp and .h so that it compiles under 1.5.7
This commit is contained in:
parent
a2493c2c48
commit
8ea511cd48
|
@ -283,6 +283,11 @@ uint8 SPIClass::recv(void) {
|
||||||
return this->read();
|
return this->read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Roger Clark. Added stub function so it will compile on 1.5.7 */
|
||||||
|
void SPIClass::setClockDivider(uint8_t rate)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Auxiliary functions
|
* Auxiliary functions
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -243,6 +243,8 @@ public:
|
||||||
void beginTransaction(uint8_t pin, SPISettings settings);
|
void beginTransaction(uint8_t pin, SPISettings settings);
|
||||||
void endTransaction(void);
|
void endTransaction(void);
|
||||||
|
|
||||||
|
static void setClockDivider(uint8_t); /* Roger Clark. Added stub function so it will compile on 1.5.7 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I/O
|
* I/O
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -133,7 +133,7 @@ uint8 TwoWire::process() {
|
||||||
i2c_shift_out(sla_addr);
|
i2c_shift_out(sla_addr);
|
||||||
if (!i2c_get_ack())
|
if (!i2c_get_ack())
|
||||||
{
|
{
|
||||||
set_scl(HIGH);// Roger Clark. 20141110 added to set clock high again, as it will be left in a low state otherwise
|
i2c_stop();// Roger Clark. 20141110 added to set clock high again, as it will be left in a low state otherwise
|
||||||
return ENACKADDR;
|
return ENACKADDR;
|
||||||
}
|
}
|
||||||
// Recieving
|
// Recieving
|
||||||
|
@ -156,7 +156,7 @@ uint8 TwoWire::process() {
|
||||||
i2c_shift_out(itc_msg.data[i]);
|
i2c_shift_out(itc_msg.data[i]);
|
||||||
if (!i2c_get_ack())
|
if (!i2c_get_ack())
|
||||||
{
|
{
|
||||||
set_scl(HIGH);// Roger Clark. 20141110 added to set clock high again, as it will be left in a low state otherwise
|
i2c_stop();// Roger Clark. 20141110 added to set clock high again, as it will be left in a low state otherwise
|
||||||
return ENACKTRNS;
|
return ENACKTRNS;
|
||||||
}
|
}
|
||||||
itc_msg.xferred++;
|
itc_msg.xferred++;
|
||||||
|
|
Loading…
Reference in New Issue