Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update examples so it works with the latest T-Call revision
- Loading branch information
1 parent
6dcb2fa
commit 6997515
Showing
3 changed files
with
75 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#define IP5306_ADDR 0x75 | ||
#define IP5306_REG_SYS_CTL0 0x00 | ||
|
||
bool setPowerBoostKeepOn(int en) | ||
{ | ||
Wire.beginTransmission(IP5306_ADDR); | ||
Wire.write(IP5306_REG_SYS_CTL0); | ||
if (en) { | ||
Wire.write(0x37); // Set bit1: 1 enable 0 disable boost keep on | ||
} else { | ||
Wire.write(0x35); // 0x37 is default reg value | ||
} | ||
return Wire.endTransmission() == 0; | ||
} |