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

10 Concurrency and synchronization #152

Open
wants to merge 4 commits into
base: Anton.Degtyarov
Choose a base branch
from

Conversation

antman88
Copy link

Tasks of improving the driver MPU6050 were implemented:
added separate thread for reading data from MPU6050,
protected static data of the driver for the case of concurrent access and
limited interaction with MPU6050 in case of frequent requests.

Added base driver for mpu6050 and overlay
for i2c for auto loading the moudle

Signed-off-by: Anton Degtyarov <[email protected]>
Moved interaction with MPU6050 into separate thread

Signed-off-by: Anton Degtyarov <[email protected]>
Protected static data of the driver for the case of concurrent access.

Signed-off-by: Anton Degtyarov <[email protected]>
Limited interaction with MPU6050 in case of frequent requests:
Defined validity interval - if the latest read data is older than this threshold
then new data reading is performed, otherwise previously read data is returned.

Signed-off-by: Anton Degtyarov <[email protected]>
@antman88 antman88 added the ready The PR is ready for review (set by author). label Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready The PR is ready for review (set by author).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant