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 <ocram.lhark@gmail.com>
This commit is contained in:
parent
51490bad55
commit
05b889457e
@ -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;
|
||||
|
@ -39,7 +39,6 @@ struct onewire_master_s;
|
||||
|
||||
struct onewire_config_s
|
||||
{
|
||||
uint8_t family; /* Device family identifier */
|
||||
uint64_t romcode; /* Unique device identifier */
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user