mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 00:51:35 +08:00
POSIX: Enabled hrt queued work to be run
In STM32, the ISR handler calls hrt_call_invoke(). There is no interrupt timer inthe POSIX port so a work item is put on the high priority work queue to expire at the next event (in ticks) or at the next max delay interval. Counter wrapping is likely still not handled properly in this code. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -51,6 +51,8 @@ __BEGIN_DECLS
|
||||
|
||||
long PX4_TICKS_PER_SEC = sysconf(_SC_CLK_TCK);
|
||||
|
||||
extern void hrt_init(void);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
extern struct wqueue_s gwork[NWORKERS];
|
||||
@@ -78,6 +80,7 @@ void init(int argc, char *argv[], const char *app_name)
|
||||
work_lpthread,
|
||||
(char* const*)NULL);
|
||||
|
||||
hrt_init();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user