Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
01488426
Commit
01488426
authored
6 years ago
by
dylad
Browse files
Options
Downloads
Patches
Plain Diff
drivers/tsl2561: add missing acquire∕release functions
parent
742b6ac4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/tsl2561/tsl2561.c
+5
-0
5 additions, 0 deletions
drivers/tsl2561/tsl2561.c
with
5 additions
and
0 deletions
drivers/tsl2561/tsl2561.c
+
5
−
0
View file @
01488426
...
...
@@ -84,6 +84,7 @@ int tsl2561_init(tsl2561_t *dev, const tsl2561_params_t *params)
#endif
_disable
(
dev
);
i2c_release
(
DEV_I2C
);
return
TSL2561_OK
;
}
...
...
@@ -212,6 +213,8 @@ static void _disable(const tsl2561_t *dev)
static
void
_read_data
(
const
tsl2561_t
*
dev
,
uint16_t
*
full
,
uint16_t
*
ir
)
{
/* acquire bus */
i2c_acquire
(
DEV_I2C
);
/* Enable the device */
_enable
(
dev
);
...
...
@@ -247,6 +250,8 @@ static void _read_data(const tsl2561_t *dev, uint16_t *full, uint16_t *ir)
/* Turn the device off to save power */
_disable
(
dev
);
/* release bus */
i2c_release
(
DEV_I2C
);
}
static
void
_print_init_info
(
const
tsl2561_t
*
dev
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment