Skip to content
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

(First draft) Added functions for reading/writing registers and conve… #189

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

bjackson312006
Copy link
Contributor

@bjackson312006 bjackson312006 commented Oct 31, 2024

Changes

  • Created INA226.c and INA226.h

  • Wrote functions for reading and writing to registers, setting up the calibration register, setting up the configuration register, and converting current, power, and voltage into real values

To Do

  • Stuff w/ the alert register and the mask/enable register
  • Possibly individual functions for configuration settings
  • Corrections to the code I've already written
  • Remove some comments when done
  • Store current_lsb as an int and possibly change other data types

Resolves #152

@bjackson312006 bjackson312006 marked this pull request as ready for review November 4, 2024 02:13
@bjackson312006 bjackson312006 requested a review from jr1221 November 4, 2024 02:14
Copy link
Contributor

@jr1221 jr1221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the public functions to the .h file. This allows the application using the driver to call the functions in the code.

@bjackson312006 bjackson312006 requested a review from jr1221 November 4, 2024 16:32
@jr1221 jr1221 merged commit 8325863 into main Nov 4, 2024
2 checks passed
@jr1221 jr1221 deleted the feature/ina226-driver branch November 4, 2024 16:36
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.

[Driver] - INA226AQDGSRQ1 Current sensor
2 participants