Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Luiz Fernando Lavado Villa
OPALIB Quick Start
Commits
495d11ad
Commit
495d11ad
authored
Jul 17, 2021
by
Clément Foucher
Browse files
Separate the task start as this causes issued with task starting while drivers init not completed.
parent
88e9fe34
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/opalib_quick_start.c
View file @
495d11ad
...
...
@@ -38,6 +38,7 @@
#define TIMER6_LABEL DT_PROP(DT_NODELABEL(timers6), label)
static
const
struct
device
*
timer6
=
NULL
;
static
uint32_t
period
;
/////
// Private functions
...
...
@@ -53,8 +54,7 @@ static void _opalib_init_task(void (*periodic_task)(), uint32_t task_period_us)
};
timer_config
(
timer6
,
&
timer_cfg
);
// Launch task by starting timer
timer_start
(
timer6
,
task_period_us
);
period
=
task_period_us
;
}
/////
...
...
@@ -99,3 +99,8 @@ void opalib_quick_start_init_current(void (*periodic_task)(), uint32_t task_peri
_opalib_init_task
(
periodic_task
,
task_period_us
);
}
}
void
opalib_quick_start_launch_task
()
{
timer_start
(
timer6
,
period
);
}
\ No newline at end of file
src/opalib_quick_start.h
View file @
495d11ad
...
...
@@ -67,6 +67,11 @@ void opalib_quick_start_init_voltage(void (*periodic_task)(), uint32_t task_peri
*/
void
opalib_quick_start_init_current
(
void
(
*
periodic_task
)(),
uint32_t
task_period_us
);
/**
* @brief Begins the periodic run of the task.
*/
void
opalib_quick_start_launch_task
();
#ifdef __cplusplus
}
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment