Skip to content
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

improve contructor call #57

Merged
Merged
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
10 changes: 2 additions & 8 deletions PCF8574.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@


PCF8574::PCF8574(const uint8_t deviceAddress, TwoWire *wire)
{
_address = deviceAddress;
_wire = wire;
_dataIn = 0;
_dataOut = 0xFF;
_buttonMask = 0xFF;
_error = PCF8574_OK;
}
: _address {deviceAddress}, _wire {wire}
{}


bool PCF8574::begin(uint8_t value)
Expand Down
9 changes: 5 additions & 4 deletions PCF8574.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ class PCF8574


private:
int _error {PCF8574_OK};
uint8_t _address;
uint8_t _dataIn;
uint8_t _dataOut;
uint8_t _buttonMask;
int _error;
uint8_t _dataIn {0};
uint8_t _dataOut {0xFF};
uint8_t _buttonMask {0xFF};


TwoWire* _wire;
};
Expand Down
Loading