ds18b20: Add a C implementation and inprove documentation

This commit adds a C implementation for the DS18B20.  The C++
implementation was untouched (ie: it does not wrap the C
implementation).  This can be done in the future if desired.

In addition, add an ascii-schematic to both the .h and .hpp files to
better illustrate how to wire up the DS 1-wire interface for the UART.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson
2016-09-13 11:27:27 -06:00
committed by Noel Eck
parent 5088ee99e6
commit 6d437c8007
6 changed files with 756 additions and 11 deletions

View File

@@ -1,5 +1,9 @@
set (libname "ds18b20")
set (libdescription "upm DS18B20 1-wire Temperature sensor")
set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp)
upm_module_init()
upm_mixed_module_init (NAME ds18b20
DESCRIPTION "DS18B20 1-wire Temperature sensor"
C_HDR ds18b20.h
C_SRC ds18b20.c
CPP_HDR ds18b20.hpp
CPP_SRC ds18b20.cxx
# FTI_SRC ds18b20_fti.c
# CPP_WRAPS_C
REQUIRES upmc-utilities mraa)