drivers: sensor: Fix ccs811 build with trigger enabled
Extending tests/drivers/build_all/sensor/ to include missing driver trigger configurations revealed that some sensor drivers failed to build with triggers enabled. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
This commit is contained in:
parent
b562807d4f
commit
6643733f26
1 changed files with 2 additions and 4 deletions
|
@ -98,10 +98,8 @@ static void gpio_callback(const struct device *dev,
|
|||
}
|
||||
|
||||
#ifdef CONFIG_CCS811_TRIGGER_OWN_THREAD
|
||||
static void irq_thread(struct ccs811_data *dev)
|
||||
static void irq_thread(struct ccs811_data *drv_data)
|
||||
{
|
||||
struct ccs811_data *drv_data = dev->data;
|
||||
|
||||
while (1) {
|
||||
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
|
||||
process_irq(drv_data->dev);
|
||||
|
@ -194,7 +192,7 @@ int ccs811_init_interrupt(const struct device *dev)
|
|||
|
||||
k_thread_create(&drv_data->thread, drv_data->thread_stack,
|
||||
CONFIG_CCS811_THREAD_STACK_SIZE,
|
||||
(k_thread_entry_t)irq_thread, dev,
|
||||
(k_thread_entry_t)irq_thread, drv_data,
|
||||
NULL, NULL, K_PRIO_COOP(CONFIG_CCS811_THREAD_PRIORITY),
|
||||
0, K_NO_WAIT);
|
||||
#elif defined(CONFIG_CCS811_TRIGGER_GLOBAL_THREAD)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue