Cleanup of UPM C++ examples. Switched from heap allocation to
stack allocation when possible. This simplifies the samples since it
removes the need for explicit memory management. A script was used to
identify and replace pointer use. To simplify the replace script, I
re-formatted the C++ examples using the UPM .clang-format file.
Unfortuantely this changes the look of the UPM C++ examples to a large
degree. However, examples will now have a standard look/feel and
uniform formatting.
* Ran clang-format w/provided UPM .clang-format file
* Removed new's/delete's whenever possible (left those in interface
examples)
* Added IIO sensor library implementation of callback void* arg
* Converted all sleeps to upm defined delays (added header when
necessary)
* Scrubbed CXX example includes
Signed-off-by: Noel Eck <noel.eck@intel.com>
There are a variety of LSM303 devices out there with various
incompatibilities and differing capabilities. The current lsm303
driver in UPM only supports the LSM303DLH variant, so it has been
renamed to lsm303dlh to avoid confusion and to make it clear which
variant is actually supported.
All examples and source files have been renamed, including header
files. In addition, the class name, LSM303, has been renamed to
LSM303DLH. No other functionality or behavior has been changed.
Signed-off-by: Jon Trulson <jtrulson@ics.com>