Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External 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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adrian
firmware
Commits
86afbc7a
Commit
86afbc7a
authored
5 years ago
by
Adrian Schneider
Browse files
Options
Downloads
Patches
Plain Diff
chore(light_sensor) add api docs for light sensor
parent
5098717c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
epicardium/epicardium.h
+33
-0
33 additions, 0 deletions
epicardium/epicardium.h
with
33 additions
and
0 deletions
epicardium/epicardium.h
+
33
−
0
View file @
86afbc7a
...
@@ -168,8 +168,41 @@ API(API_INTERRUPT_ENABLE, int epic_interrupt_enable(api_int_id_t int_id));
...
@@ -168,8 +168,41 @@ API(API_INTERRUPT_ENABLE, int epic_interrupt_enable(api_int_id_t int_id));
*/
*/
API
(
API_INTERRUPT_DISABLE
,
int
epic_interrupt_disable
(
api_int_id_t
int_id
));
API
(
API_INTERRUPT_DISABLE
,
int
epic_interrupt_disable
(
api_int_id_t
int_id
));
/**
* Start continuous readout of the light sensor. Will read light level
* at preconfigured interval and make it available via `epic_light_sensor_get()`
*
* :return: `0` if the start was successful or a negative error value
* if an error occured. Possible errors:
*
* - ``-EBUSY``: The timer could not be scheduled.
* - ``-EALREADY``: The continuous readout is already running. You can ignore
* this error and safely use `epic_light_sensor_get()` anyways.
*/
API
(
API_LIGHT_SENSOR_RUN
,
int
epic_light_sensor_run
());
API
(
API_LIGHT_SENSOR_RUN
,
int
epic_light_sensor_run
());
/**
* Get the last light level measured by the continuous readout.
*
* :param uint16_t* value: where the last light level should be written.
* :return: `0` if the readout was successful or a negative error
* value. Possible errors:
*
* - ``-ENODATA``: Continuous readout not currently running.
*/
API
(
API_LIGHT_SENSOR_GET
,
int
epic_light_sensor_get
(
uint16_t
*
value
));
API
(
API_LIGHT_SENSOR_GET
,
int
epic_light_sensor_get
(
uint16_t
*
value
));
/**
* Stop continuous readout of the light sensor.
*
* :return: `0` if the stop was sucessful or a negative error value
* if an error occured. Possible errors:
*
* - ``-EBUSY``: The timer stop could not be scheduled.
* - ``-EINVAL``: The continuous readout was not running. The continuous
* readout can be safely restarted.
*/
API
(
API_LIGHT_SENSOR_STOP
,
int
epic_light_sensor_stop
());
API
(
API_LIGHT_SENSOR_STOP
,
int
epic_light_sensor_stop
());
#endif
/* _EPICARDIUM_H */
#endif
/* _EPICARDIUM_H */
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