2022-03-08 17:12:34 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
zephyr_library()
|
|
|
|
|
|
|
|
zephyr_sources_ifdef(CONFIG_USERSPACE w1_handlers.c)
|
2022-07-19 19:41:43 +08:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_W1_SHELL w1_shell.c)
|
2022-03-08 17:12:34 +08:00
|
|
|
zephyr_library_sources(w1_common.c)
|
|
|
|
|
|
|
|
# drivers implementing link functions (read, write, reset)
|
2022-07-21 05:19:40 +08:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_W1_DS2484 w1_ds2484.c)
|
2022-03-06 19:19:09 +08:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_W1_TEST w1_test.c)
|
2021-07-19 00:41:20 +08:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_W1_ZEPHYR_SERIAL w1_zephyr_serial.c)
|
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
|
|
|
|
|
|
|
# network functions:
|
|
|
|
if(CONFIG_W1_NET)
|
|
|
|
# network functions should be callable from user as well as supervisor mode:
|
|
|
|
remove_definitions(-D__ZEPHYR_SUPERVISOR__)
|
|
|
|
zephyr_library_sources(w1_net.c)
|
|
|
|
endif() #CONFIG_W1_NET
|