Multi-uORB support changes - part 1

This adds support for a dynamic build for QuRT and initial
Multi-uORB changes to enable communication between the DSP and
the application processor.

This part of the changes do not affect the POSIX build. This is
enablement for the QuRT build using Multi-uORB. The second part
of the changes will be added in a new module under src/modules.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-06-08 22:21:59 -07:00
parent 99c066c39c
commit 6cb26de74c
52 changed files with 3387 additions and 86 deletions
+10 -7
View File
@@ -85,10 +85,11 @@ Device::log(const char *fmt, ...)
PX4_INFO("[%s] ", _name);
va_start(ap, fmt);
vprintf(fmt, ap);
PX4_INFO( fmt, ap );
//vprintf(fmt, ap);
va_end(ap);
printf("\n");
fflush(stdout);
//printf("\n");
//fflush(stdout);
}
void
@@ -97,12 +98,14 @@ Device::debug(const char *fmt, ...)
va_list ap;
if (_debug_enabled) {
printf("<%s> ", _name);
PX4_INFO("<%s> ", _name);
//printf("<%s> ", _name);
va_start(ap, fmt);
vprintf(fmt, ap);
//vprintf(fmt, ap);
PX4_INFO(fmt, ap);
va_end(ap);
printf("\n");
fflush(stdout);
//printf("\n");
//fflush(stdout);
}
}
+12 -1
View File
@@ -81,7 +81,9 @@ I2C::I2C(const char *name,
I2C::~I2C()
{
if (_fd >= 0) {
#ifndef __PX4_QURT
::close(_fd);
#endif
_fd = -1;
}
}
@@ -116,6 +118,7 @@ I2C::init()
_fd = 10000;
}
else {
#ifndef __PX4_QURT
// Open the actual I2C device and map to the virtual dev name
_fd = ::open(get_devname(), O_RDWR);
if (_fd < 0) {
@@ -123,6 +126,7 @@ I2C::init()
px4_errno = errno;
return PX4_ERROR;
}
#endif
}
return ret;
@@ -246,8 +250,11 @@ ssize_t I2C::read(file_t *filp, char *buffer, size_t buflen)
warnx ("2C SIM I2C::read");
return 0;
}
#ifndef __PX4_QURT
return ::read(_fd, buffer, buflen);
#else
return 0;
#endif
}
ssize_t I2C::write(file_t *filp, const char *buffer, size_t buflen)
@@ -257,7 +264,11 @@ ssize_t I2C::write(file_t *filp, const char *buffer, size_t buflen)
return buflen;
}
#ifndef __PX4_QURT
return ::write(_fd, buffer, buflen);
#else
return buflen;
#endif
}
} // namespace device