You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/04/15 07:28:49 UTC
[incubator-nuttx] branch master updated: 1wire: Removes duplicate
device information
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 05b8894 1wire: Removes duplicate device information
05b8894 is described below
commit 05b889457e541c28cc2849d8324d45a52faf814a
Author: Marco Krahl <oc...@gmail.com>
AuthorDate: Thu Apr 15 07:23:08 2021 +0200
1wire: Removes duplicate device information
Removes the family identifier from the device configuration, since the device
family is already part of the rom code and the underlying logic does know how
to extract this information.
include/nuttx/1wire drivers/sensors
stm32f103-minimim
Signed-off-by: Marco Krahl <oc...@gmail.com>
---
drivers/sensors/ds18b20.c | 3 +--
include/nuttx/1wire/1wire_master.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/sensors/ds18b20.c b/drivers/sensors/ds18b20.c
index fdb521d..8716a17 100644
--- a/drivers/sensors/ds18b20.c
+++ b/drivers/sensors/ds18b20.c
@@ -286,7 +286,7 @@ static int ds18b20_isalarm(FAR struct onewire_master_s *master,
alarm.romcode = config->romcode;
alarm.isalarm = false;
- ret = onewire_search(master, config->family, true, ds18b20_alarm_cb,
+ ret = onewire_search(master, DS18B20_DEVICE_FAMILY, true, ds18b20_alarm_cb,
&alarm);
if (ret > 0)
{
@@ -935,7 +935,6 @@ int ds18b20_register(int devno, FAR struct onewire_master_s *onewire,
priv->master = onewire;
priv->config.romcode = romcode;
- priv->config.family = DS18B20_DEVICE_FAMILY;
priv->reg.res = DS18B20_RES_CONV(DS18B20_RESMAX);
priv->reg.alarm.thigh = DS18B20_TALARM_MAX;
priv->reg.alarm.tlow = DS18B20_TALARM_MIN;
diff --git a/include/nuttx/1wire/1wire_master.h b/include/nuttx/1wire/1wire_master.h
index 77187e2..c4fd342 100644
--- a/include/nuttx/1wire/1wire_master.h
+++ b/include/nuttx/1wire/1wire_master.h
@@ -39,7 +39,6 @@ struct onewire_master_s;
struct onewire_config_s
{
- uint8_t family; /* Device family identifier */
uint64_t romcode; /* Unique device identifier */
};