-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the tsl2540 sensor to drivers. Signed-off-by: Rick Talbott <[email protected]> updated Signed-off-by: RIck Talbott <[email protected]>
- Loading branch information
1 parent
14573fc
commit 4bdbd6f
Showing
14 changed files
with
837 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
zephyr_library() | ||
|
||
zephyr_library_sources(tsl2540.c) | ||
zephyr_library_sources_ifdef(CONFIG_TSL2540_TRIGGER tsl2540_trigger.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# TSL2540 Ambient Light Sensor configuration options | ||
|
||
# Copyright (c) 2022 T-Mobile USA, Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
menuconfig TSL2540 | ||
bool "TSL2540 Ambient Light Sensor" | ||
default y | ||
depends on DT_HAS_AMS_TSL2540_ENABLED | ||
select I2C | ||
help | ||
Enable driver for TSL2540 sensors. | ||
|
||
if TSL2540 | ||
|
||
config TSL2540_TRIGGER | ||
bool | ||
|
||
choice | ||
prompt "Trigger mode" | ||
default TSL2540_TRIGGER_NONE | ||
help | ||
Specify the type of triggering to be used by the driver. | ||
|
||
config TSL2540_TRIGGER_NONE | ||
bool "No trigger" | ||
|
||
config TSL2540_TRIGGER_GLOBAL_THREAD | ||
bool "Use global thread" | ||
depends on GPIO | ||
select TSL2540_TRIGGER | ||
|
||
config TSL2540_TRIGGER_OWN_THREAD | ||
bool "Use own thread" | ||
depends on GPIO | ||
select TSL2540_TRIGGER | ||
|
||
endchoice | ||
|
||
config TSL2540_THREAD_PRIORITY | ||
int "Thread priority" | ||
depends on TSL2540_TRIGGER_OWN_THREAD | ||
default 10 | ||
help | ||
Priority of thread used by the driver to handle interrupts. | ||
|
||
config TSL2540_THREAD_STACK_SIZE | ||
int "Thread stack size" | ||
depends on TSL2540_TRIGGER_OWN_THREAD | ||
default 1024 | ||
help | ||
Stack size of thread used by the driver to handle interrupts. | ||
|
||
endif # TSL2540 |
Oops, something went wrong.