-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
conclusion: resolvedIssue was resolvedIssue was resolvedtopic: documentationRelated to documentation for the projectRelated to documentation for the projecttype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
In the example BasicUsage.ino, we call the Arduino_PMIC.h header file.
| #include "Arduino_PMIC.h" |
This is problematic for two main reasons:
- Firstly, the naming implies that there is a single unified interface for dealing with PMIC across the Arduino ecosystem. Which there isn't: we have four in active use AFAIK. This leads to confusion from a documentation point of view.
- Secondly, given the way files are arranged library conflicts may occur between the BQ24195 and PF1550 library since both have a
Arduino_PMIC.hfile. Depending upon which library is loaded first, it can block the other library from loading.Arduino_PF1550/src/Arduino_PMIC.h
Line 19 in 2852629
#ifndef ARDUINO_PMIC_H_
Possible Solutions
- Quick fix: In our examples, we directly call the relevant library. So instead of
Arduino_PMIC.hwe would useBQ24195.horPF1550.h. This should be possible. Users are then advised to check which board they have and select the PMIC library accordingly. This would slightly reduce the portability of the code, but ensure that it runs correctly - Intensive Fix: Have a wrapper library, which contains
Arduino_PMIC.hthat calls the relevant PMIC library based on the board selected in the IDE or (optionally) an option in the sketch directly. I assume this would require more work (and potentially break things). Yet it would make the user experience more fluid. - The third option would be to integrate the PMIC library directly into the core variant. @giulcioffi and @facchinm have done this for the https://github.com/arduino/ArduinoCore-mbed/blob/master/libraries/Nicla_System/src/BQ25120A.h
Until a solution is decided upon & delivered, is it safe to use PF1550.h inside newly developed tutorials & app notes?
Related to: arduino-libraries/Arduino_BQ24195#23
Metadata
Metadata
Assignees
Labels
conclusion: resolvedIssue was resolvedIssue was resolvedtopic: documentationRelated to documentation for the projectRelated to documentation for the projecttype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project