Skip to content

driver: add mpu_common#5484

Closed
smlng wants to merge 3 commits intoRIOT-OS:masterfrom
smlng:pr_mpu_common
Closed

driver: add mpu_common#5484
smlng wants to merge 3 commits intoRIOT-OS:masterfrom
smlng:pr_mpu_common

Conversation

@smlng
Copy link
Copy Markdown
Member

@smlng smlng commented May 31, 2016

  • generic driver for MPU motion sensors
  • works with MPU6050 (6-axis) and MPU9150 (9-axis)
  • MPU9150 requires #define MPU_WITH_COMPASS

@OlegHahm
Copy link
Copy Markdown
Member

Ah, at first I thought you were talking about an memory protection unit.

@OlegHahm OlegHahm added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label May 31, 2016
@smlng
Copy link
Copy Markdown
Member Author

smlng commented Jun 2, 2016

@OlegHahm: I agree mpu_common might be a bit confusing. However, IMHO we should reconsider naming conventions for drivers anyway, i.e., how to name drivers that support multiple devices/sensors with only minor code diffs? See PR #5433, too. For CPUs we already have some CPU/ARCH_common subdir and on top CPU type specific subdirs. IMHO it would be better to group drivers for similar devices into a single subdir (with a reasonable name).

Anyway, this PR is WIP as it does not replace the driver for mpu9150 but adds a common driver for mpu-based devices, namely mpu6050 and mpu9150 - but it likely works for the mpu9250 as well.

@smlng smlng added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Area: drivers Area: Device drivers labels Jun 2, 2016
@miri64
Copy link
Copy Markdown
Member

miri64 commented Oct 18, 2016

What is up with the commits in this PR?

@smlng
Copy link
Copy Markdown
Member Author

smlng commented Oct 18, 2016

@miri64 I can rebase/update this one for the upcoming release.

However, the problem was/is with the naming: there are 3 devices MPU6050, MPU9150, and MPU9250. They all basically work with this driver - the 9x50 version are identical and 6050 has no compass. Sticking to the naming scheme within RIOT drivers the driver has to be named MPUxy50 which is kind of ugly.

Or, similar to the cpu section, we could introduce mpu_common and subdirs for each device?

@miri64
Copy link
Copy Markdown
Member

miri64 commented Oct 18, 2016

However, the problem was/is with the naming: there are 3 devices MPU6050, MPU9150, and MPU9250. They all basically work with this driver - the 9x50 version are identical and 6050 has no compass. Sticking to the naming scheme within RIOT drivers the driver has to be named MPUxy50 which is kind of ugly.

Or, similar to the cpu section, we could introduce mpu_common and subdirs for each device?

Non of this explains the messed up history ;-)

@miri64 I can rebase/update this one for the upcoming release.

Since there seems to be some discussion in this PR, I can't promise that it will make it for this release, but I guess given the commit history a rebase wouldn't hurt ;-)

@smlng
Copy link
Copy Markdown
Member Author

smlng commented Oct 18, 2016

oh, those other commits - mhm 🤔 I may have to cleanup a bit more ...

smlng added 3 commits October 19, 2016 11:33
- generic driver for MPU motion sensors
- works with MPU6050 (6-axis) and MPU9150 (9-axis)
- MPU9150 requires #define MPU_WITH_COMPASS
@OlegHahm
Copy link
Copy Markdown
Member

What's the current state?

@PeterKietzmann
Copy link
Copy Markdown
Member

We still did not decide a rule of thumb in which way we want to organize similar device drivers, even though was a short discussion devel already

@smlng
Copy link
Copy Markdown
Member Author

smlng commented Jan 20, 2017

the driver would work for mpu_6050, mpu_9150, mpu_9250. With our current rule it would've to be named mpu_xy5z that's what @PeterKietzmann is refering to.

My idea was to introduce some similar concept as for cpu here, have a large mpu_common driver an only very small device specific parts.

@smlng smlng closed this Jan 20, 2017
@smlng smlng reopened this Jan 20, 2017
@aabadie aabadie modified the milestone: Release 2017.07 Jun 23, 2017
@smlng
Copy link
Copy Markdown
Member Author

smlng commented Jan 12, 2018

I won't have to time to make this ready for release, remove milestone for now.

@smlng smlng removed this from the Release 2018.01 milestone Jan 12, 2018
@tcschmidt
Copy link
Copy Markdown
Member

Is there activity expected or can we close this?

@smlng
Copy link
Copy Markdown
Member Author

smlng commented May 26, 2018

one of my early works in RIOT, will rework in a new PR - closing this one as memo

@smlng smlng closed this May 26, 2018
@smlng smlng added the State: archived State: The PR has been archived for possible future re-adaptation label May 26, 2018
@hoekstraarie
Copy link
Copy Markdown

How can I actually use this driver? Or can I just use the mpu9x50 driver with my mpu6050 module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers State: archived State: The PR has been archived for possible future re-adaptation State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet 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.

7 participants