projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/ms5607: Allow applications to not use the normal data ring and thread
[fw/altos]
/
src
/
drivers
/
ao_ms5607.c
diff --git
a/src/drivers/ao_ms5607.c
b/src/drivers/ao_ms5607.c
index 261df67f7cacfdce5dd0b09fbfb6311f03da8939..0afdf01276b3a5d40337308a5058d1a99f297741 100644
(file)
--- a/
src/drivers/ao_ms5607.c
+++ b/
src/drivers/ao_ms5607.c
@@
-191,9
+191,13
@@
ao_ms5607_sample(__xdata struct ao_ms5607_sample *sample)
#include "ao_ms5607_convert.c"
#endif
#include "ao_ms5607_convert.c"
#endif
-#if HAS_TASK
+#ifndef HAS_MS5607_TASK
+#define HAS_MS5607_TASK HAS_TASK
+#endif
+
__xdata struct ao_ms5607_sample ao_ms5607_current;
__xdata struct ao_ms5607_sample ao_ms5607_current;
+#if HAS_MS5607_TASK
static void
ao_ms5607(void)
{
static void
ao_ms5607(void)
{
@@
-209,7
+213,9
@@
ao_ms5607(void)
}
__xdata struct ao_task ao_ms5607_task;
}
__xdata struct ao_task ao_ms5607_task;
+#endif
+#if HAS_TASK
void
ao_ms5607_info(void)
{
void
ao_ms5607_info(void)
{
@@
-248,6
+254,8
@@
ao_ms5607_init(void)
#if HAS_TASK
ao_cmd_register(&ao_ms5607_cmds[0]);
#if HAS_TASK
ao_cmd_register(&ao_ms5607_cmds[0]);
+#endif
+#if HAS_MS5607_TASK
ao_add_task(&ao_ms5607_task, ao_ms5607, "ms5607");
#endif
ao_add_task(&ao_ms5607_task, ao_ms5607, "ms5607");
#endif