2022-03-08 17:12:34 +08:00
|
|
|
# 1-Wire configuration options
|
|
|
|
|
|
|
|
# Copyright (c) 2022 Thomas Stranger
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
menuconfig W1
|
|
|
|
bool
|
2023-03-27 20:55:23 +08:00
|
|
|
prompt "1-Wire bus drivers"
|
2022-09-27 00:13:43 +08:00
|
|
|
select CRC
|
2022-03-08 17:12:34 +08:00
|
|
|
help
|
|
|
|
Enable 1-Wire Drivers
|
|
|
|
|
|
|
|
if W1
|
|
|
|
|
|
|
|
module = W1
|
|
|
|
module-str = W1
|
|
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
|
|
|
|
config W1_INIT_PRIORITY
|
|
|
|
int
|
|
|
|
default 65
|
|
|
|
prompt "Init priority"
|
|
|
|
help
|
|
|
|
1-Wire device driver initialization priority.
|
|
|
|
|
2022-07-19 19:41:43 +08:00
|
|
|
config W1_SHELL
|
|
|
|
bool "1-Wire Shell"
|
|
|
|
depends on SHELL
|
|
|
|
help
|
|
|
|
Enable 1-Wire Shell for testing.
|
|
|
|
|
|
|
|
config W1_SHELL_BUFFER_SIZE
|
|
|
|
int
|
|
|
|
default 16
|
|
|
|
depends on W1_SHELL
|
|
|
|
prompt "1-Wire Shell buffer size"
|
|
|
|
help
|
|
|
|
Size of the send and receive buffer in bytes.
|
|
|
|
To be able to write more than 8 bytes make
|
|
|
|
sure to also increase SHELL_ARGC_MAX accordingly.
|
|
|
|
|
2023-03-09 21:19:48 +08:00
|
|
|
rsource "Kconfig.ds2482-800"
|
2022-07-21 05:19:40 +08:00
|
|
|
rsource "Kconfig.ds2484"
|
2022-03-09 06:40:00 +08:00
|
|
|
rsource "Kconfig.ds2477_85"
|
|
|
|
rsource "Kconfig.ds2485"
|
2023-11-30 18:48:26 +08:00
|
|
|
rsource "Kconfig.max32"
|
2022-03-06 19:19:09 +08:00
|
|
|
rsource "Kconfig.test"
|
2023-11-30 11:33:09 +08:00
|
|
|
rsource "Kconfig.zephyr_gpio"
|
2021-07-19 00:41:20 +08:00
|
|
|
rsource "Kconfig.zephyr_serial"
|
2022-03-06 19:19:09 +08:00
|
|
|
|
drivers: w1 introduce 1-wire net layer api
This commit introduces a new api for the net layer of Dallas
1-wire protocol.
For single drop configurations w1_read_rom, and w1_skip_rom commands are
provided.
For multidrop configurations w1_match_rom, w1_resume_command,
w1_search_rom, and w1_search_alarm routines are provided as well.
Additionally, the reset_select routine, conditionally depending on the
bus configuration, either executes a match_rom, or a skip rom command.
A w1_write_read command simplifies the typical scenario of addressing
a device, writing a few bytes to the device and reading back the answer.
Additionally w1_crc8, and w1_crc16 are added as wrappers around the
zephyr in-tree crc8 and crc16_reflect implementations.
The former may be used to verify the validity of the rom id, while the
latter is used for integrity checking of many eeprom, and authenticator
commands.
The general search command does not support filtering on
the family code.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 02:00:23 +08:00
|
|
|
config W1_NET
|
|
|
|
bool "1-Wire network layer"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enable 1-wire network layer
|
|
|
|
|
2023-04-04 14:02:09 +08:00
|
|
|
config W1_NET_FORCE_MULTIDROP_ADDRESSING
|
|
|
|
bool "Force 1-Wire multidrop addressing"
|
|
|
|
depends on W1_NET
|
|
|
|
help
|
|
|
|
This option will ignore the number of 1-Wire
|
|
|
|
slave devices defined in the DTS. Specifically,
|
|
|
|
this option avoids the SKIP ROM command,
|
|
|
|
which is otherwise used in case of a single
|
|
|
|
1-Wire slave on the bus. In most cases, enabling
|
|
|
|
this option is not needed, yet it is essential
|
|
|
|
if multiple 1-Wire devices unspecified in the
|
|
|
|
DTS are interfaced.
|
|
|
|
|
2022-03-08 17:12:34 +08:00
|
|
|
endif # W1
|