Added end() to HardWire (I2C)
This commit is contained in:
parent
f47846662d
commit
953aa8b88e
|
@ -75,3 +75,8 @@ HardWire::~HardWire() {
|
|||
void HardWire::begin(uint8 self_addr) {
|
||||
i2c_master_enable(sel_hard, dev_flags);
|
||||
}
|
||||
|
||||
void HardWire:end() {
|
||||
i2c_disable(sel_hard);
|
||||
sel_hard = 0;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,11 @@ public:
|
|||
* passed flags
|
||||
*/
|
||||
HardWire(uint8, uint8 = 0);
|
||||
|
||||
/*
|
||||
* Shuts down (disables) the hardware I2C
|
||||
*/
|
||||
void end();
|
||||
|
||||
/*
|
||||
* Disables the I2C device and remove the device address.
|
||||
|
|
Loading…
Reference in New Issue