In an effort to clean-up and standardize UPM library
documentation, this commit updates (and in most cases,
unifies) the CMake description string AND CXX header
@comname string.
Strings were taken from datasheets when possible, spelling
mistakes were addressed, copy/paste errors where fixed,
Title Case was used, etc.
* Tested/updated/added @web tags
* Added/updated invalid sensor images
* Added/updated @man tags, added missing manufacturers
Signed-off-by: Noel Eck <noel.eck@intel.com>
In certain systems, where -std=c11 is used, certain posix extensions
are disabled unless specifically enabled. On these systems, this
could cause usleep() and/or nanosleep() to fail with an implicit
declaration warning. This patch ensures that at least POSIX 200809 is
used, if otherwise undefined.
This should fix Issue #513.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
usleep() has been deprecated, and can cause compile problems on never
glibc versions (debian jesse). We now use nanosleep() on linux
systems to implement delays.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
- Fixed the Zephyr kernel version checks to check for 0.1.6 rather
than 1.6.0.
- fixed the k_timer implementation to actually work. None of these
were being called correctly.
- due to the fact that the k_timer API only has a 1ms resolution,
re-implement upm_delay_us() (on 0.1.6 version of zephyr) as a busy
loop using a upm_clock_t.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
The new clock functions provide a mechanism for measuring durations in
the ms (millisecond) or us (microsecond) range, in a platform
independant manner.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit touches a subset of UPM sensors which contain C source.
Cleaned up the CMakeLists.txt DESCRIPTION field to better represent
the library.
Signed-off-by: Noel Eck <noel.eck@intel.com>
In certain cases with the Arduino 101/Zephyr, using the upm_delay*()
functions can cause hangs and/or exceptions. Adding a single tick to
the generated offset resolves these issues.
The documentation warns that this is a good idea to ensure that a
timer does not expire early. Adding this made the random hangs and
CPU exceptions go away.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Test commit for building C UPM modules.
* Added C include directory
* Added C utilities directory
* Rename C++ upm.h -> upm.hpp to make room for C upm.h
* Added upm_mixed_module_init function to src/CMakeLists.txt. This
function takes filesnames similar to upm_module_init and does a
bit of processing before calling upm_module_init.
* Added c example directory. Changed c++ example names.
* Added dfrph implemention for testing (C++ wraps C). Added mraa
to .pc requires for dfrph. Tested against stand-alone project.
Added dfrph c example.
* Update implemention of pkg-config file generation.
* Added two cmake cache variables: BUILDCPP and BUILDFTI
* Removed src from swig_add_module calls, added libname to
swig_link_libraries calls. Shrinks swig'ed binaries by ~13%.
* Added install target in upm/CMakeLists.txt to install C header,
directory. Is this where we want this?
* C FTI header directory is include/fti
Signed-off-by: Noel Eck <noel.eck@intel.com>