Skip to content

Add generic functions to write to or read from internal registers + use Wire1 #1

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

Merged
merged 9 commits into from
Oct 15, 2020

Conversation

giulcioffi
Copy link
Contributor

The new provided functions allow to use from the sketch:

  • PMIC.writePMICreg(Register const reg_addr, uint8_t val)
  • uint8_t regVal = PF1550.readPMICreg(Register const reg_addr)
  • PF1550.setPMICbit(Register const reg_addr, uint8_t posBit)
    They can be tested using the provided example "ReadWriteRegs.ino".
    The read function has been used to monitor some PMIC register from the fuel gauge library Arduino_MAX1726.

Communication goes over I2C on Wire1 (pin PB7 and PB8).

Debug capability has been added with the function PF1550.debug(Stream& stream) which takes as argument the Serial interface on which the user wants to print the internal debug messages.

@giulcioffi giulcioffi requested a review from facchinm September 28, 2020 14:11
@facchinm facchinm merged commit 2852629 into arduino-libraries:master Oct 15, 2020
@aentinger aentinger deleted the TerminationCurrentTest branch November 2, 2020 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants