Skip to content

Device Driver for TMP006 Sensor#2148

Merged
PeterKietzmann merged 2 commits intoRIOT-OS:masterfrom
jfischer-no:pr@tmp006
Jan 7, 2015
Merged

Device Driver for TMP006 Sensor#2148
PeterKietzmann merged 2 commits intoRIOT-OS:masterfrom
jfischer-no:pr@tmp006

Conversation

@jfischer-no
Copy link
Copy Markdown
Contributor

This PR add support for TI TMP006 Infrared Thermopile Sensor.

@LudwigKnuepfer LudwigKnuepfer added Area: drivers Area: Device drivers Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Dec 5, 2014
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why didn't you define the registers in a/the header file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was lazy to create a header file for these 5 registers. The constants can actually be moved to include/tmp006.h.

@PeterKietzmann
Copy link
Copy Markdown
Member

This one looks goog to me. Will test when the hardware arrives :-)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cppcheck complains about this line:

drivers/tmp006/tmp006.c:189: warning (nullPointer): Possible null pointer dereference: drdy - otherwise it is redundant to check it against null.

Looks like a false positive to me (you don't check if it is a nullpointer but if the conversion is ready (at least that's what I get from reading the code/comments).
If I'm right you should suppress this warning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

my error, if (!drdy) -> if (!(*drdy))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That makes even more sense ;)

@PeterKietzmann
Copy link
Copy Markdown
Member

The application seems to work and runs stable even if I don't know where the offset comes from. Same as for your other drivers, waiting for vtimer bugfix. Also needs squashing like @LudwigOrtmann described in #2121.

@PeterKietzmann
Copy link
Copy Markdown
Member

@jfischer-phytec-iot I think you did really great work! Acking all your PRs does not seem far.

@OlegHahm OlegHahm added the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Jan 6, 2015
@PeterKietzmann
Copy link
Copy Markdown
Member

vtimer works now. Needs squashing and waiting for #2059 to be merged. Then I'll give my final ACK.

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Jan 7, 2015

@PeterKietzmann, I think we could merge it independent from #2059.

@PeterKietzmann
Copy link
Copy Markdown
Member

Okay, if you are happy with the formalities I'm too. Was just wondering if it's strange to merge an application for a board that is not in master. This also applies to #2119, #2121 and #2123.

@PeterKietzmann
Copy link
Copy Markdown
Member

Let's go

PeterKietzmann added a commit that referenced this pull request Jan 7, 2015
@PeterKietzmann PeterKietzmann merged commit 076706f into RIOT-OS:master Jan 7, 2015
@jfischer-no jfischer-no deleted the pr@tmp006 branch January 31, 2015 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants