-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
driver/tmp00x: make tmp006 more generic #12022
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks pretty good. There are a few things to improve. I think we can also work on splitting the commits up a little bit better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better. Just the #define location (from .c to .h) then I will move on to testing!
160d64e
to
39bcdae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was having a bit of trouble yesterday even getting this thing up and running (on master too) and ran out of time. I will have to pick the testing up a bit later.
drivers/include/tmp00x.h
Outdated
@@ -88,30 +89,67 @@ extern "C" | |||
{ | |||
#endif | |||
|
|||
#define TMP00X_CONFIG_RST (1 << 15) /**< Reset register */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, a lot of this should be in the tmp00x_regs.h not here. This is only to be exposed to the user of the driver. They probably shouldn't have to care about the shift register and masks.
Rename TMP006 to TMP00x Add TMP007 sensor support to TMP00X Change uint8_t reg to uint16_t Add to doxygen documentation group Expose compile time configurations Move defines from .c to .h Change double to float, because double is not needed Add TMP007 register information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Witnessed testing. It seems fine, seems like a improvement in maintainability as well.
ACK
Congrats on your first PR! |
Contribution description
The driver for the TMP006 Infrared Thermopile Sensor has been modified to work for the TMP006 and TMP007. The driver was tested with the CC2650-launchpad
Testing procedure
The test under tests/driver_tmp00x can be performed normally for the TMP006 sensor. The following parameter must be set for the TMP007 sensor: DRIVER=tmp007