2017 hongo b team
Dependents: I2C Alpha_Apper I2C
Diff: ApprI2CMaster.cpp
- Revision:
- 1:8076e33b6ba1
- Parent:
- 0:11209e14c06c
--- a/ApprI2CMaster.cpp Fri Sep 08 03:27:32 2017 +0000 +++ b/ApprI2CMaster.cpp Thu Sep 21 04:37:15 2017 +0000 @@ -6,6 +6,7 @@ _my_type = my_type_; _master = master_; _addr = addr_; + res_data = 0; } void ApprI2CMaster::write(uint8_t data) @@ -22,7 +23,6 @@ int ApprI2CMaster::read() { char buffer[3] = {}; - int res_data = 0; _master->read(_addr, buffer, 3); @@ -38,10 +38,7 @@ break; }; - return res_data; } - else - { - return res_data; - } + + return res_data; } \ No newline at end of file