# Copyright (c) 2025 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

config STK8BA58
	bool "STK8BA58 I2C accelerometer sensor"
	default y
	depends on DT_HAS_SENSORTEK_STK8BA58_ENABLED
	select I2C
	select CRC
	help
	  Enable driver for STK8BA58 3-axis MEMS accelerometer sensors.

if STK8BA58

choice STK8BA58_TRIGGER_MODE
	prompt "Trigger mode"
	help
	  Specify the type of triggering to be used by the driver.

config STK8BA58_TRIGGER_NONE
	bool "No trigger"

config STK8BA58_TRIGGER_GLOBAL_THREAD
	bool "Use global thread"
	depends on GPIO
	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_SENSORTEK_STK8BA58),irq-gpios)
	select STK8BA58_TRIGGER

config STK8BA58_TRIGGER_OWN_THREAD
	bool "Use own thread"
	depends on GPIO
	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_SENSORTEK_STK8BA58),irq-gpios)
	select STK8BA58_TRIGGER

endchoice

config STK8BA58_TRIGGER
	bool

config STK8BA58_THREAD_PRIORITY
	int "Thread priority"
	depends on STK8BA58_TRIGGER_OWN_THREAD
	default 10
	help
	  Priority of thread used by the driver to handle interrupts.

config STK8BA58_THREAD_STACK_SIZE
	int "Thread stack size"
	depends on STK8BA58_TRIGGER_OWN_THREAD
	default 1024
	help
	  Stack size of thread used by the driver to handle interrupts.

endif # STK8BA58
