The current and shunt voltage register values are signed, twos
complement format. In my tests interpreting them directly in the
way implemented here gave output consistent with other ina219
libraries.
First I imported the commits from v3.6.6 with:
PKG=devices
git init $PKG
cd $PKG
git remote add origin https://github.com/google/periph
git fetch origin
git filter-repo \
--path AUTHORS \
--path CONTRIBUTING.md \
--path CONTRIBUTORS \
--path LICENSE \
--path README.md \
--path $PKG --path experimental/$PKG $@
git remote add origin git@github.com:periph/$PKG
git fetch origin
# Use the occasion to rename from master to main since we are starting from
# scratch.
git branch -m main
git push origin main
Then I fixed the layout to get rid of experimental with:
git rm experimental/devices/README.md
git mv experimental/devices/* .
git mv devices/* .
The import paths will be fixed in a follow up.