This should be reverted when these 2 classes are removed from the i2clcd library. Will also require updating all the examples to load the new modules instead.
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Replaced all occurances. While there are a few references
to magnometer out there, magnetometer is used much more broadly.
Signed-off-by: Noel Eck <noel.eck@intel.com>
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>
SWIGJAVA is defined for the swig interface file processing but is not
defined for the sensor library source build. There are multiple sensors
that appear to rely solely on SWIGJAVA - these are not building
correctly. Adding SWIGJAVA define for the java module src build.
Signed-off-by: Noel Eck <noel.eck@intel.com>
A handful of modules do not require mraa. Captured this in
src/CMakeLists.txt - only add mraa dependency for targets which
use:
upm_module_init(mraa ... )
or
upm_mixed_module_init(... REQUIRES mraa)
All sensors which use UPM interfaces (src/interfaces) now
explicitly add the interfaces target:
upm_module_init(interfaces ... )
or
upm_mixed_module_init(... REQUIRES interfaces)
Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit attempts to use a more cmake-friendly approach when
handling inter-target dependencies. A combination of macros and
include_directories usage provided overzealous compile -I/blah
entries which equates to large catch-all build commands. For
example, the last CXX target contains include directories for nearly
all preceeding targets (~190). Library dependencies were also often
wrong or missing.
* Removed nearly all used of include_directories (swig cmake
commands still appear to need these for generating the swig
command line)
* Updated usage of target_link_libraries in upm_module_init,
also changed to using target_include_directories per target.
This greatly simplifies upm/mixed_module_init usage for libraries
which depend on other libraries (in this project).
example (src/tb7300/CMakeLists.txt)
old:
# upm-libbacnetmstp will bring in libbacnet, I hope
set (reqlibname "upm-bacnetmstp")
include_directories(${BACNET_INCLUDE_DIRS})
include_directories("../bacnetmstp")
upm_module_init()
upm_target_link_libraries(${libname} bacnetmstp)
new:
upm_module_init(bacnetmstp)
The reason here, is that tb7300 depends on bacnetmstp, which
depends on BACNET includes/libs, so tb7300 gets the headers and
libraries transitively via its dependency on bacnetmstp.
* Updated pkg-config .pc file generation flow to reflect changes
with dependencies.
* Create a real target for the interfaces (CXX abstract sensor
classes). Renamed the directory from 'upm/src/upm' to
'upm/src/interfaces' Also changed the install location of the
interface headers to include/upm/interfaces. Updated interface
header usage to reflect this.
* Updated a few sensor libs to use fwd declarations for mraa.
Ideally the UPM libs would do more of this which eases the
burden on anyone building on top of the sensor libraries since
they would not need to know about mraa headers.
* Fixed examples which use symbols not defined in local includes
Signed-off-by: Noel Eck <noel.eck@intel.com>
This is a housekeeping commit to move the upm_module_init
macro to a function. The scope resolution of the function
call adds a bit more protection for the variables used inside
this macro/function.
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>
These changes add the ability to intialize a speaker instance to use a
PWM pin instead of a standard GPIO pin in order to emit sounds.
The current GPIO functionality is fairly constrained by the
implementation -- it only permits playing cerain hardcoded "notes".
The PWM support allows one to emit specific frequencies (currently
between 50-32Khz) using a PWM pin. Of course, you may still be
constrained by the limits of your PWM hardware in the end.
There are a few new functions provided to support this PWM mode. To
use the PWM mode of speaker, use the speaker_init_pwm() initialization
routine instead of speaker_init() (for C). For C++ and the SWIG
languages, pass "true" as the second argument to the constructor to
enable PWM mode. The default is "false", to match current default
behavior (GPIO).
Functions that are not related to a given mode (GPIO vs. PWM) will do
nothing if not usable in that mode.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
uartat is the underlying UART driver, specifically for use with
AT-style command driven devices like modems.
The le910 support is provided in the form of examples that make use
of the uartat driver to interact with the device.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Previously, the C++ and C versions of this driver were separate. Now
the C++ implementation wraps the C implementation.
In addition, the C++ init() function has been deprecated. It
currently does nothing, and examples have been modified to remove it's
calls. This function will be removed in a separate release.
The examples have been further modified to update all detected devices
and print their respective temperatures, instead of only reporting the
on the first device detected.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Handle failure in ISR routine - attempt to read status and
FIFO registers and continue sampleing (vs exiting and turning
off continuous sampling).
Signed-off-by: Noel Eck <noel.eck@intel.com>