Skip to content

drivers/lis3dh: FIFO mode improvements#3054

Merged
PeterKietzmann merged 1 commit intoRIOT-OS:masterfrom
jnohlgard:pr/lis3dh-fifo
Jul 7, 2015
Merged

drivers/lis3dh: FIFO mode improvements#3054
PeterKietzmann merged 1 commit intoRIOT-OS:masterfrom
jnohlgard:pr/lis3dh-fifo

Conversation

@jnohlgard
Copy link
Copy Markdown
Member

This PR is a refactor of the LIS3DH driver to improve the FIFO mode setting API and add support for the INT1 interrupt signal.
I changed some of the enums into macros since they were not exactly used as a list of enumerated values. The names were kept though, so the user code does not need to be modified.

Tested on mulle.

@jnohlgard jnohlgard added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: drivers Area: Device drivers labels May 25, 2015
@PeterKietzmann
Copy link
Copy Markdown
Member

@gebart I had a look at you changes. I was just wondering why you didn't change the hardware register addresses to macros also (but I don't really mind). Everything looks like an improvement and reasonable to me. I'd give my ACK when someone ran the test with positive result.

@jnohlgard
Copy link
Copy Markdown
Member Author

@PeterKietzmann I reasoned that the hardware register addresses make up an enumerated list of locations, so I let it remain an enum. The other definitions were different types of bit masks which feels less suited as enum values.

Does anyone else have this chip connected to anything other than a Mulle?

@PeterKietzmann
Copy link
Copy Markdown
Member

@gebart I think you can squash your commits. At least the first and the second one. But the third can be squashed as well I guess. Does anyone have a LIS3DH sensor to test this? Otherwise someone with a Mulle board?

@PeterKietzmann
Copy link
Copy Markdown
Member

Nobody owns a LIS3DH sensor?

@PeterKietzmann
Copy link
Copy Markdown
Member

Or does at least anyone has a mulle-board to confirm this improvement?

@jnohlgard
Copy link
Copy Markdown
Member Author

Rebased, updated after GPIO init changes

@PeterKietzmann
Copy link
Copy Markdown
Member

@gebart I will look at the latest commits next week. Then I propose to just merge this PR.

@jnohlgard jnohlgard added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Jun 28, 2015
@jnohlgard
Copy link
Copy Markdown
Member Author

ping @PeterKietzmann

@PeterKietzmann
Copy link
Copy Markdown
Member

Missing ">" here (don't know if the link works. Its in the header file line 19)

@PeterKietzmann
Copy link
Copy Markdown
Member

Superfluous "@" in lis3dh.h:246

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.

In lis3dh_t you also have int2. I'm wondering (i) why this function is named with a "1" or (ii) why there is not function for int2

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

INT1 and INT2 are the signal names for the interrupt pins in the data sheet. I did not implement any INT2 functionality, but I think it is more clear if I call the function _int1 instead of _int since someone might want to implement INT2 in the future.

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.

Ok with me

@PeterKietzmann
Copy link
Copy Markdown
Member

@gebart I think in general I'm fine with this PR. Is this sensor available for anyone in the meantime?

@PeterKietzmann
Copy link
Copy Markdown
Member

@gebart please squash

@jnohlgard
Copy link
Copy Markdown
Member Author

squashed

@jnohlgard jnohlgard removed the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Jul 7, 2015
@PeterKietzmann PeterKietzmann added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 7, 2015
@PeterKietzmann
Copy link
Copy Markdown
Member

and go

PeterKietzmann added a commit that referenced this pull request Jul 7, 2015
drivers/lis3dh: FIFO mode improvements
@PeterKietzmann PeterKietzmann merged commit b16ff82 into RIOT-OS:master Jul 7, 2015
@jnohlgard jnohlgard deleted the pr/lis3dh-fifo branch July 8, 2015 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants