File tree Expand file tree Collapse file tree 5 files changed +61
-0
lines changed Expand file tree Collapse file tree 5 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ add_subdirectory_ifdef(CONFIG_CACHE_MANAGEMENT cache)
24
24
add_subdirectory_ifdef (CONFIG_CAN can )
25
25
add_subdirectory_ifdef (CONFIG_CHARGER charger )
26
26
add_subdirectory_ifdef (CONFIG_CLOCK_CONTROL clock_control )
27
+ add_subdirectory_ifdef (CONFIG_COMPARATOR comparator )
27
28
add_subdirectory_ifdef (CONFIG_CONSOLE console )
28
29
add_subdirectory_ifdef (CONFIG_COREDUMP_DEVICE coredump )
29
30
add_subdirectory_ifdef (CONFIG_COUNTER counter )
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ source "drivers/cache/Kconfig"
15
15
source "drivers/can/Kconfig"
16
16
source "drivers/charger/Kconfig"
17
17
source "drivers/clock_control/Kconfig"
18
+ source "drivers/comparator/Kconfig"
18
19
source "drivers/console/Kconfig"
19
20
source "drivers/coredump/Kconfig"
20
21
source "drivers/counter/Kconfig"
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2024 Nordic Semiconductor ASA
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ zephyr_syscall_header (${ZEPHYR_BASE} /include/zephyr/drivers/comparator.h )
5
+
6
+ zephyr_library ()
7
+
8
+ zephyr_library_sources_ifdef (CONFIG_USERSPACE comparator_handlers.c )
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2024 Nordic Semiconductor ASA
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ menuconfig COMPARATOR
5
+ bool "Comparator drivers"
6
+ help
7
+ Enable comparator driver configuration.
8
+
9
+ if COMPARATOR
10
+
11
+ module = COMPARATOR
12
+ module-str = comparator
13
+ source "subsys/logging/Kconfig.template.log_config"
14
+
15
+ config COMPARATOR_INIT_PRIORITY
16
+ int "COMPARATOR init priority"
17
+ default KERNEL_INIT_PRIORITY_DEVICE
18
+ help
19
+ Comparator device driver initialization priority.
20
+
21
+ endif # COMPARATOR
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2024 Nordic Semiconductor
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ #include <zephyr/drivers/comparator.h>
8
+ #include <zephyr/internal/syscall_handler.h>
9
+
10
+ static inline int z_vrfy_comparator_get_output (const struct device * dev )
11
+ {
12
+ K_OOPS (K_SYSCALL_DRIVER_COMPARATOR (dev , get_output ));
13
+ return z_impl_comparator_get_output (dev );
14
+ }
15
+ #include <zephyr/syscalls/comparator_get_output_mrsh.c>
16
+
17
+ static inline int z_vrfy_comparator_set_trigger (const struct device * dev ,
18
+ enum comparator_trigger trigger )
19
+ {
20
+ K_OOPS (K_SYSCALL_DRIVER_COMPARATOR (dev , set_trigger ));
21
+ return z_impl_comparator_set_trigger (dev , trigger );
22
+ }
23
+ #include <zephyr/syscalls/comparator_set_trigger_mrsh.c>
24
+
25
+ static inline int z_vrfy_comparator_trigger_is_pending (const struct device * dev )
26
+ {
27
+ K_OOPS (K_SYSCALL_DRIVER_COMPARATOR (dev , trigger_is_pending ));
28
+ return z_impl_comparator_trigger_is_pending (dev );
29
+ }
30
+ #include <zephyr/syscalls/comparator_trigger_is_pending_mrsh.c>
You can’t perform that action at this time.
0 commit comments