added small changes to dummy implementation

master
polymurph 4 years ago
parent 1e7e7fc168
commit cdd710ad16

@ -19,9 +19,9 @@ class I2C::I2C_impl
const uint8_t& reg)
{
std::cout << "dummy I2C readByte()" << std::endl;
std::cout << "address: " << static_cast<int>(address) << std::endl;
std::cout << "reg : " << static_cast<int>(reg) << std::endl;
std::cout << "returning 0" << std::endl;
std::cout << "\taddress: " << static_cast<int>(address) << std::endl;
std::cout << "\treg : " << static_cast<int>(reg) << std::endl;
std::cout << "\treturning 0" << std::endl;
return 0;
}
@ -31,9 +31,9 @@ class I2C::I2C_impl
const uint8_t& byte)
{
std::cout << "dummy I2C writeByte()" << std::endl;
std::cout << "address: " << static_cast<int>(address) << std::endl;
std::cout << "reg : " << static_cast<int>(reg) << std::endl;
std::cout << "byte : " << static_cast<int>(byte) << std::endl;
std::cout << "\taddress: " << static_cast<int>(address) << std::endl;
std::cout << "\treg : " << static_cast<int>(reg) << std::endl;
std::cout << "\tbyte : " << static_cast<int>(byte) << std::endl;
}
@ -41,9 +41,9 @@ class I2C::I2C_impl
const uint8_t& reg)
{
std::cout << "dummy I2C readWord()" << std::endl;
std::cout << "address: " << static_cast<int>(address) << std::endl;
std::cout << "reg : " << static_cast<int>(reg) << std::endl;
std::cout << "returning 0" << std::endl;
std::cout << "\taddress: " << static_cast<int>(address) << std::endl;
std::cout << "\treg : " << static_cast<int>(reg) << std::endl;
std::cout << "\treturning 0" << std::endl;
return 0;
}
@ -53,9 +53,9 @@ class I2C::I2C_impl
const uint16_t& word)
{
std::cout << "dummy I2C writeWord()" << std::endl;
std::cout << "address: " << static_cast<int>(address) << std::endl;
std::cout << "reg : " << static_cast<int>(reg) << std::endl;
std::cout << "word : " << static_cast<int>(word) << std::endl;
std::cout << "\taddress: " << static_cast<int>(address) << std::endl;
std::cout << "\treg : " << static_cast<int>(reg) << std::endl;
std::cout << "\tword : " << static_cast<int>(word) << std::endl;
}
void readBuffer(const uint8_t& address,
@ -66,13 +66,13 @@ class I2C::I2C_impl
uint8_t i = 0;
std::cout << "dummy I2C readBuffer()" << std::endl;
std::cout << "address: " << static_cast<int>(address) << std::endl;
std::cout << "reg : " << static_cast<int>(reg) << std::endl;
std::cout << "filling array..." << std::endl;
std::cout << "\taddress: " << static_cast<int>(address) << std::endl;
std::cout << "\treg : " << static_cast<int>(reg) << std::endl;
std::cout << "\tfilling array..." << std::endl;
for(i = 0; i < len; i++) {
data[i] = i;
}
std::cout << "...done!" << std::endl;
std::cout << "\t...done!" << std::endl;
}
void writeBuffer(const uint8_t& address,
@ -83,11 +83,11 @@ class I2C::I2C_impl
uint8_t i = 0;
std::cout << "dummy I2C writeBuffer()" << std::endl;
std::cout << "address: " << static_cast<int>(address) << std::endl;
std::cout << "reg : " << static_cast<int>(reg) << std::endl;
std::cout << "writing array..." << std::endl;
std::cout << "\taddress: " << static_cast<int>(address) << std::endl;
std::cout << "\treg : " << static_cast<int>(reg) << std::endl;
std::cout << "\twriting array..." << std::endl;
for(i = 0; i < len; i++) {
std::cout << static_cast<int>(data[i]) << std::endl;
std::cout << "\t" << static_cast<int>(data[i]) << std::endl;
}
}

Binary file not shown.
Loading…
Cancel
Save