A couple of fixups prior to merging into main project

Changed the ds_sensor_t struct to just return a float instead of major/minor
Renamed ds18b20.h functions to have consistent `ds18b20_*` naming.
Removed some unnecessary LICENSE files.  Clarified onewire origin/license.
This commit is contained in:
Alex Stewart 2016-02-22 21:18:50 -08:00
parent 6178865cc6
commit d0ed5f03a2
9 changed files with 37 additions and 88 deletions

View file

@ -2,19 +2,16 @@
#define DRIVER_DS18B20_H_
typedef struct {
uint8_t id;
uint8_t major;
uint8_t minor;
uint8_t id;
float value;
} ds_sensor_t;
// Scan all ds18b20 sensors on bus and return its amount.
// Result are saved in array of ds_sensor_t structure.
// Cause printf in esp sdk don`t support float,
// I split result as two number (major, minor).
uint8_t readDS18B20(uint8_t pin, ds_sensor_t *result);
uint8_t ds18b20_read_all(uint8_t pin, ds_sensor_t *result);
// This method is just to demonstrate how to read
// temperature from single dallas chip.
float read_single_DS18B20(uint8_t pin);
float ds18b20_read_single(uint8_t pin);
#endif