From 0ba5305e94b519cdcb1cdbcd0c5c32c391a50e62 Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Thu, 7 May 2015 23:21:24 -0700 Subject: [PATCH] QuRT: satisfy missing deps There is no ioctl or write. Added stubs. Signed-off-by: Mark Charlebois --- src/drivers/device/i2c_posix.cpp | 4 ++++ src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/drivers/device/i2c_posix.cpp b/src/drivers/device/i2c_posix.cpp index f02b021ffc..473307b1cc 100644 --- a/src/drivers/device/i2c_posix.cpp +++ b/src/drivers/device/i2c_posix.cpp @@ -108,6 +108,10 @@ I2C::init() return PX4_ERROR; } +#ifdef __PX4_QURT + simulate = true; +#endif + if (simulate) { _fd = 10000; } diff --git a/src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp b/src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp index 6431536e75..c077e21c8a 100644 --- a/src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp +++ b/src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp @@ -82,6 +82,7 @@ static void entry_adapter ( void *ptr ) printf("entry_adapter\n"); pthdata_t *data = (pthdata_t *) ptr; + printf("data->entry = %p\n", data->entry); data->entry(data->argc, data->argv); free(ptr); printf("after entry\n"); @@ -106,6 +107,7 @@ px4_task_t px4_task_spawn_cmd(const char *name, int scheduler, int priority, int unsigned long structsize; char * p = (char *)argv; + printf("px4_task_spawn_cmd entry = %p\n", entry); // Calculate argc while (p != (char *)0) { p = argv[argc]; @@ -193,4 +195,7 @@ extern "C" { void hrt_sleep(unsigned long) { } + } +int ioctl(int d, int request, unsigned long foo) { return 0; } +int write(int a, char const*b, int c) { return c; }