drivers: sensor: use k_thread_create()
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
d26cf2dc33
commit
33f80d7c85
32 changed files with 98 additions and 57 deletions
|
@ -230,6 +230,7 @@ struct lsm9ds0_gyro_data {
|
|||
|
||||
#if defined(CONFIG_LSM9DS0_GYRO_TRIGGER_DRDY)
|
||||
char __stack thread_stack[CONFIG_LSM9DS0_GYRO_THREAD_STACK_SIZE];
|
||||
struct k_thread thread;
|
||||
struct device *dev;
|
||||
|
||||
struct device *gpio_drdy;
|
||||
|
|
|
@ -97,10 +97,10 @@ int lsm9ds0_gyro_init_interrupt(struct device *dev)
|
|||
|
||||
k_sem_init(&data->sem, 0, UINT_MAX);
|
||||
|
||||
k_thread_spawn(data->thread_stack,
|
||||
CONFIG_LSM9DS0_GYRO_THREAD_STACK_SIZE,
|
||||
lsm9ds0_gyro_thread_main, dev, NULL, NULL,
|
||||
K_PRIO_COOP(10), 0, 0);
|
||||
k_thread_create(&data->thread, data->thread_stack,
|
||||
CONFIG_LSM9DS0_GYRO_THREAD_STACK_SIZE,
|
||||
lsm9ds0_gyro_thread_main, dev, NULL, NULL,
|
||||
K_PRIO_COOP(10), 0, 0);
|
||||
|
||||
data->gpio_drdy = device_get_binding(config->gpio_drdy_dev_name);
|
||||
if (!data->gpio_drdy) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue