drivers: sensor: fix thread function signatures

Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
This commit is contained in:
Benedikt Schmidt 2023-09-21 09:53:22 +02:00 committed by Carles Cufí
parent ba49cb81f1
commit 191865b51c
50 changed files with 337 additions and 99 deletions

View File

@ -30,8 +30,13 @@ static void adt7310_gpio_callback(const struct device *dev, struct gpio_callback
}
#if defined(CONFIG_ADT7310_TRIGGER_OWN_THREAD)
static void adt7310_thread(struct adt7310_data *drv_data)
static void adt7310_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct adt7310_data *drv_data = p1;
while (true) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
if (drv_data->th_handler != NULL) {
@ -125,7 +130,7 @@ int adt7310_init_interrupt(const struct device *dev)
k_sem_init(&drv_data->gpio_sem, 0, 1);
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_ADT7310_THREAD_STACK_SIZE,
(k_thread_entry_t)adt7310_thread, drv_data,
adt7310_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_ADT7310_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_ADT7310_TRIGGER_GLOBAL_THREAD)

View File

@ -76,8 +76,13 @@ static void adt7420_gpio_callback(const struct device *dev,
}
#if defined(CONFIG_ADT7420_TRIGGER_OWN_THREAD)
static void adt7420_thread(struct adt7420_data *drv_data)
static void adt7420_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct adt7420_data *drv_data = p1;
while (true) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
process_int(drv_data->dev);
@ -162,7 +167,7 @@ int adt7420_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_ADT7420_THREAD_STACK_SIZE,
(k_thread_entry_t)adt7420_thread, drv_data,
adt7420_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_ADT7420_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_ADT7420_TRIGGER_GLOBAL_THREAD)

View File

@ -62,8 +62,13 @@ static void adxl362_gpio_callback(const struct device *dev,
}
#if defined(CONFIG_ADXL362_TRIGGER_OWN_THREAD)
static void adxl362_thread(struct adxl362_data *drv_data)
static void adxl362_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct adxl362_data *drv_data = p1;
while (true) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
adxl362_thread_cb(drv_data->dev);
@ -171,7 +176,7 @@ int adxl362_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_ADXL362_THREAD_STACK_SIZE,
(k_thread_entry_t)adxl362_thread, drv_data,
adxl362_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_ADXL362_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_ADXL362_TRIGGER_GLOBAL_THREAD)

View File

@ -69,8 +69,13 @@ static void adxl372_gpio_callback(const struct device *dev,
}
#if defined(CONFIG_ADXL372_TRIGGER_OWN_THREAD)
static void adxl372_thread(struct adxl372_data *drv_data)
static void adxl372_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct adxl372_data *drv_data = p1;
while (true) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
adxl372_thread_cb(drv_data->dev);
@ -177,7 +182,7 @@ int adxl372_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_ADXL372_THREAD_STACK_SIZE,
(k_thread_entry_t)adxl372_thread, drv_data,
adxl372_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_ADXL372_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_ADXL372_TRIGGER_GLOBAL_THREAD)

View File

@ -113,8 +113,13 @@ static void amg88xx_thread_cb(const struct device *dev)
}
#ifdef CONFIG_AMG88XX_TRIGGER_OWN_THREAD
static void amg88xx_thread(struct amg88xx_data *drv_data)
static void amg88xx_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct amg88xx_data *drv_data = p1;
while (42) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
amg88xx_thread_cb(drv_data->dev);
@ -196,7 +201,7 @@ int amg88xx_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_AMG88XX_THREAD_STACK_SIZE,
(k_thread_entry_t)amg88xx_thread, drv_data,
amg88xx_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_AMG88XX_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_AMG88XX_TRIGGER_GLOBAL_THREAD)

View File

@ -127,8 +127,13 @@ static void bma280_thread_cb(const struct device *dev)
}
#ifdef CONFIG_BMA280_TRIGGER_OWN_THREAD
static void bma280_thread(struct bma280_data *drv_data)
static void bma280_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct bma280_data *drv_data = p1;
while (1) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
bma280_thread_cb(drv_data->dev);
@ -281,7 +286,7 @@ int bma280_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_BMA280_THREAD_STACK_SIZE,
(k_thread_entry_t)bma280_thread, drv_data,
bma280_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_BMA280_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_BMA280_TRIGGER_GLOBAL_THREAD)

View File

@ -81,8 +81,12 @@ static void bmc150_magn_gpio_drdy_callback(const struct device *dev,
k_sem_give(&data->sem);
}
static void bmc150_magn_thread_main(struct bmc150_magn_data *data)
static void bmc150_magn_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct bmc150_magn_data *data = p1;
const struct bmc150_magn_config *config = data->dev->config;
uint8_t reg_val;
@ -145,7 +149,7 @@ int bmc150_magn_init_interrupt(const struct device *dev)
k_thread_create(&data->thread, data->thread_stack,
CONFIG_BMC150_MAGN_TRIGGER_THREAD_STACK,
(k_thread_entry_t)bmc150_magn_thread_main,
bmc150_magn_thread_main,
data, NULL, NULL,
K_PRIO_COOP(10), 0, K_NO_WAIT);

View File

@ -181,8 +181,13 @@ static void bmg160_handle_int(const struct device *dev)
static K_KERNEL_STACK_DEFINE(bmg160_thread_stack, CONFIG_BMG160_THREAD_STACK_SIZE);
static struct k_thread bmg160_thread;
static void bmg160_thread_main(struct bmg160_device_data *bmg160)
static void bmg160_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct bmg160_device_data *bmg160 = p1;
while (true) {
k_sem_take(&bmg160->trig_sem, K_FOREVER);
@ -245,7 +250,7 @@ int bmg160_trigger_init(const struct device *dev)
k_sem_init(&bmg160->trig_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&bmg160_thread, bmg160_thread_stack,
CONFIG_BMG160_THREAD_STACK_SIZE,
(k_thread_entry_t)bmg160_thread_main,
bmg160_thread_main,
bmg160, NULL, NULL,
K_PRIO_COOP(CONFIG_BMG160_THREAD_PRIORITY), 0,
K_NO_WAIT);

View File

@ -71,8 +71,10 @@ static void bmi160_handle_interrupts(const struct device *dev)
static K_KERNEL_STACK_DEFINE(bmi160_thread_stack, CONFIG_BMI160_THREAD_STACK_SIZE);
static struct k_thread bmi160_thread;
static void bmi160_thread_main(struct bmi160_data *data)
static void bmi160_thread_main(void *p1, void *p2, void *p3)
{
struct bmi160_data *data = p1;
while (1) {
k_sem_take(&data->sem, K_FOREVER);
bmi160_handle_interrupts(data->dev);
@ -276,7 +278,7 @@ int bmi160_trigger_mode_init(const struct device *dev)
k_thread_create(&bmi160_thread, bmi160_thread_stack,
CONFIG_BMI160_THREAD_STACK_SIZE,
(k_thread_entry_t)bmi160_thread_main,
bmi160_thread_main,
data, NULL, NULL,
K_PRIO_COOP(CONFIG_BMI160_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -85,8 +85,13 @@ static void bmi270_thread_cb(const struct device *dev)
}
#ifdef CONFIG_BMI270_TRIGGER_OWN_THREAD
static void bmi270_thread(struct bmi270_data *data)
static void bmi270_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct bmi270_data *data = p1;
while (1) {
k_sem_take(&data->trig_sem, K_FOREVER);
bmi270_thread_cb(data->dev);
@ -173,7 +178,7 @@ int bmi270_init_interrupts(const struct device *dev)
#if CONFIG_BMI270_TRIGGER_OWN_THREAD
k_sem_init(&data->trig_sem, 0, 1);
k_thread_create(&data->thread, data->thread_stack, CONFIG_BMI270_THREAD_STACK_SIZE,
(k_thread_entry_t)bmi270_thread, data, NULL, NULL,
bmi270_thread, data, NULL, NULL,
K_PRIO_COOP(CONFIG_BMI270_THREAD_PRIORITY), 0, K_NO_WAIT);
#elif CONFIG_BMI270_TRIGGER_GLOBAL_THREAD
k_work_init(&data->trig_work, bmi270_trig_work_cb);

View File

@ -31,8 +31,13 @@ static void bq274xx_handle_interrupts(const struct device *dev)
static K_KERNEL_STACK_DEFINE(bq274xx_thread_stack, CONFIG_BQ274XX_THREAD_STACK_SIZE);
static struct k_thread bq274xx_thread;
static void bq274xx_thread_main(struct bq274xx_data *data)
static void bq274xx_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct bq274xx_data *data = p1;
while (1) {
k_sem_take(&data->sem, K_FOREVER);
bq274xx_handle_interrupts(data->dev);
@ -79,7 +84,7 @@ int bq274xx_trigger_mode_init(const struct device *dev)
k_thread_create(&bq274xx_thread, bq274xx_thread_stack,
CONFIG_BQ274XX_THREAD_STACK_SIZE,
(k_thread_entry_t)bq274xx_thread_main,
bq274xx_thread_main,
data, NULL, NULL,
K_PRIO_COOP(CONFIG_BQ274XX_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -98,8 +98,13 @@ static void gpio_callback(const struct device *dev,
}
#ifdef CONFIG_CCS811_TRIGGER_OWN_THREAD
static void irq_thread(struct ccs811_data *drv_data)
static void irq_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct ccs811_data *drv_data = p1;
while (1) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
process_irq(drv_data->dev);
@ -192,7 +197,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, drv_data,
irq_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_CCS811_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_CCS811_TRIGGER_GLOBAL_THREAD)

View File

@ -60,8 +60,13 @@ static void fdc2x1x_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_FDC2X1X_TRIGGER_OWN_THREAD
static void fdc2x1x_thread(struct fdc2x1x_data *drv_data)
static void fdc2x1x_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct fdc2x1x_data *drv_data = p1;
while (true) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
fdc2x1x_thread_cb(drv_data->dev);
@ -158,7 +163,7 @@ int fdc2x1x_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_FDC2X1X_THREAD_STACK_SIZE,
(k_thread_entry_t)fdc2x1x_thread,
fdc2x1x_thread,
drv_data, 0, NULL,
K_PRIO_COOP(CONFIG_FDC2X1X_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -68,8 +68,13 @@ static void fxas21002_handle_int(const struct device *dev)
}
#ifdef CONFIG_FXAS21002_TRIGGER_OWN_THREAD
static void fxas21002_thread_main(struct fxas21002_data *data)
static void fxas21002_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct fxas21002_data *data = p1;
while (true) {
k_sem_take(&data->trig_sem, K_FOREVER);
fxas21002_handle_int(data->dev);
@ -173,7 +178,7 @@ int fxas21002_trigger_init(const struct device *dev)
k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&data->thread, data->thread_stack,
CONFIG_FXAS21002_THREAD_STACK_SIZE,
(k_thread_entry_t)fxas21002_thread_main, data, 0, NULL,
fxas21002_thread_main, data, 0, NULL,
K_PRIO_COOP(CONFIG_FXAS21002_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_FXAS21002_TRIGGER_GLOBAL_THREAD)

View File

@ -168,8 +168,13 @@ static void fxos8700_handle_int(const struct device *dev)
}
#ifdef CONFIG_FXOS8700_TRIGGER_OWN_THREAD
static void fxos8700_thread_main(struct fxos8700_data *data)
static void fxos8700_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct fxos8700_data *data = p1;
while (true) {
k_sem_take(&data->trig_sem, K_FOREVER);
fxos8700_handle_int(data->dev);
@ -395,7 +400,7 @@ int fxos8700_trigger_init(const struct device *dev)
k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&data->thread, data->thread_stack,
CONFIG_FXOS8700_THREAD_STACK_SIZE,
(k_thread_entry_t)fxos8700_thread_main,
fxos8700_thread_main,
data, NULL, NULL,
K_PRIO_COOP(CONFIG_FXOS8700_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -71,8 +71,13 @@ static void grow_r502a_gpio_callback(const struct device *dev,
}
#if defined(CONFIG_GROW_R502A_TRIGGER_OWN_THREAD)
static void grow_r502a_thread(struct grow_r502a_data *drv_data)
static void grow_r502a_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct grow_r502a_data *drv_data = p1;
while (true) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
process_int(drv_data->gpio_dev);
@ -111,7 +116,7 @@ int grow_r502a_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_GROW_R502A_THREAD_STACK_SIZE,
(k_thread_entry_t)grow_r502a_thread, drv_data, NULL,
grow_r502a_thread, drv_data, NULL,
NULL, K_PRIO_COOP(CONFIG_GROW_R502A_THREAD_PRIORITY), 0,
K_NO_WAIT);
#elif defined(CONFIG_GROW_R502A_TRIGGER_GLOBAL_THREAD)

View File

@ -78,8 +78,13 @@ static void hmc5883l_thread_cb(const struct device *dev)
}
#ifdef CONFIG_HMC5883L_TRIGGER_OWN_THREAD
static void hmc5883l_thread(struct hmc5883l_data *drv_data)
static void hmc5883l_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct hmc5883l_data *drv_data = p1;
while (1) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
hmc5883l_thread_cb(drv_data->dev);
@ -124,7 +129,7 @@ int hmc5883l_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_HMC5883L_THREAD_STACK_SIZE,
(k_thread_entry_t)hmc5883l_thread,
hmc5883l_thread,
drv_data, NULL, NULL,
K_PRIO_COOP(CONFIG_HMC5883L_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -95,8 +95,13 @@ static void hts221_drdy_callback(const struct device *dev,
}
#ifdef CONFIG_HTS221_TRIGGER_OWN_THREAD
static void hts221_thread(struct hts221_data *data)
static void hts221_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct hts221_data *data = p1;
while (1) {
k_sem_take(&data->drdy_sem, K_FOREVER);
process_drdy(data->dev);
@ -163,7 +168,7 @@ int hts221_init_interrupt(const struct device *dev)
k_thread_create(&data->thread, data->thread_stack,
CONFIG_HTS221_THREAD_STACK_SIZE,
(k_thread_entry_t)hts221_thread, data,
hts221_thread, data,
NULL, NULL, K_PRIO_COOP(CONFIG_HTS221_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_HTS221_TRIGGER_GLOBAL_THREAD)

View File

@ -112,8 +112,13 @@ static void iis2dh_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_IIS2DH_TRIGGER_OWN_THREAD
static void iis2dh_thread(struct iis2dh_data *iis2dh)
static void iis2dh_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct iis2dh_data *iis2dh = p1;
while (1) {
k_sem_take(&iis2dh->gpio_sem, K_FOREVER);
iis2dh_handle_interrupt(iis2dh->dev);
@ -149,7 +154,7 @@ int iis2dh_init_interrupt(const struct device *dev)
k_thread_create(&iis2dh->thread, iis2dh->thread_stack,
CONFIG_IIS2DH_THREAD_STACK_SIZE,
(k_thread_entry_t)iis2dh_thread, iis2dh,
iis2dh_thread, iis2dh,
0, NULL, K_PRIO_COOP(CONFIG_IIS2DH_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_IIS2DH_TRIGGER_GLOBAL_THREAD)

View File

@ -233,8 +233,13 @@ static void iis2dlpc_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_IIS2DLPC_TRIGGER_OWN_THREAD
static void iis2dlpc_thread(struct iis2dlpc_data *iis2dlpc)
static void iis2dlpc_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct iis2dlpc_data *iis2dlpc = p1;
while (1) {
k_sem_take(&iis2dlpc->gpio_sem, K_FOREVER);
iis2dlpc_handle_interrupt(iis2dlpc->dev);
@ -270,7 +275,7 @@ int iis2dlpc_init_interrupt(const struct device *dev)
k_thread_create(&iis2dlpc->thread, iis2dlpc->thread_stack,
CONFIG_IIS2DLPC_THREAD_STACK_SIZE,
(k_thread_entry_t)iis2dlpc_thread, iis2dlpc,
iis2dlpc_thread, iis2dlpc,
NULL, NULL, K_PRIO_COOP(CONFIG_IIS2DLPC_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_IIS2DLPC_TRIGGER_GLOBAL_THREAD)

View File

@ -182,8 +182,13 @@ static void iis2iclx_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_IIS2ICLX_TRIGGER_OWN_THREAD
static void iis2iclx_thread(struct iis2iclx_data *iis2iclx)
static void iis2iclx_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct iis2iclx_data *iis2iclx = p1;
while (1) {
k_sem_take(&iis2iclx->gpio_sem, K_FOREVER);
iis2iclx_handle_interrupt(iis2iclx->dev);
@ -218,7 +223,7 @@ int iis2iclx_init_interrupt(const struct device *dev)
k_thread_create(&iis2iclx->thread, iis2iclx->thread_stack,
CONFIG_IIS2ICLX_THREAD_STACK_SIZE,
(k_thread_entry_t)iis2iclx_thread,
iis2iclx_thread,
iis2iclx, NULL, NULL,
K_PRIO_COOP(CONFIG_IIS2ICLX_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -83,8 +83,13 @@ static void iis2mdc_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_IIS2MDC_TRIGGER_OWN_THREAD
static void iis2mdc_thread(struct iis2mdc_data *iis2mdc)
static void iis2mdc_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct iis2mdc_data *iis2mdc = p1;
while (1) {
k_sem_take(&iis2mdc->gpio_sem, K_FOREVER);
iis2mdc_handle_interrupt(iis2mdc->dev);
@ -118,7 +123,7 @@ int iis2mdc_init_interrupt(const struct device *dev)
k_sem_init(&iis2mdc->gpio_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&iis2mdc->thread, iis2mdc->thread_stack,
CONFIG_IIS2MDC_THREAD_STACK_SIZE,
(k_thread_entry_t)iis2mdc_thread, iis2mdc,
iis2mdc_thread, iis2mdc,
NULL, NULL, K_PRIO_COOP(CONFIG_IIS2MDC_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_IIS2MDC_TRIGGER_GLOBAL_THREAD)

View File

@ -99,8 +99,13 @@ static void iis3dhhc_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_IIS3DHHC_TRIGGER_OWN_THREAD
static void iis3dhhc_thread(struct iis3dhhc_data *iis3dhhc)
static void iis3dhhc_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct iis3dhhc_data *iis3dhhc = p1;
while (1) {
k_sem_take(&iis3dhhc->gpio_sem, K_FOREVER);
iis3dhhc_handle_interrupt(iis3dhhc->dev);
@ -136,7 +141,7 @@ int iis3dhhc_init_interrupt(const struct device *dev)
k_thread_create(&iis3dhhc->thread, iis3dhhc->thread_stack,
CONFIG_IIS3DHHC_THREAD_STACK_SIZE,
(k_thread_entry_t)iis3dhhc_thread, iis3dhhc,
iis3dhhc_thread, iis3dhhc,
NULL, NULL, K_PRIO_COOP(CONFIG_IIS3DHHC_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_IIS3DHHC_TRIGGER_GLOBAL_THREAD)

View File

@ -121,8 +121,12 @@ static void isl29035_thread_cb(const struct device *dev)
}
#ifdef CONFIG_ISL29035_TRIGGER_OWN_THREAD
static void isl29035_thread(const struct device *dev)
static void isl29035_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
const struct device *dev = p1;
struct isl29035_driver_data *drv_data = dev->data;
while (1) {
@ -205,7 +209,7 @@ int isl29035_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_ISL29035_THREAD_STACK_SIZE,
(k_thread_entry_t)isl29035_thread,
isl29035_thread,
(void *)dev, NULL, NULL,
K_PRIO_COOP(CONFIG_ISL29035_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -226,8 +226,13 @@ static void ism330dhcx_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_ISM330DHCX_TRIGGER_OWN_THREAD
static void ism330dhcx_thread(struct ism330dhcx_data *ism330dhcx)
static void ism330dhcx_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct ism330dhcx_data *ism330dhcx = p1;
while (1) {
k_sem_take(&ism330dhcx->gpio_sem, K_FOREVER);
ism330dhcx_handle_interrupt(ism330dhcx->dev);
@ -261,7 +266,7 @@ int ism330dhcx_init_interrupt(const struct device *dev)
k_thread_create(&ism330dhcx->thread, ism330dhcx->thread_stack,
CONFIG_ISM330DHCX_THREAD_STACK_SIZE,
(k_thread_entry_t)ism330dhcx_thread,
ism330dhcx_thread,
ism330dhcx, NULL, NULL,
K_PRIO_COOP(CONFIG_ISM330DHCX_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -506,8 +506,13 @@ static void lis2dh_thread_cb(const struct device *dev)
}
#ifdef CONFIG_LIS2DH_TRIGGER_OWN_THREAD
static void lis2dh_thread(struct lis2dh_data *lis2dh)
static void lis2dh_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct lis2dh_data *lis2dh = p1;
while (1) {
k_sem_take(&lis2dh->gpio_sem, K_FOREVER);
lis2dh_thread_cb(lis2dh->dev);
@ -538,7 +543,7 @@ int lis2dh_init_interrupt(const struct device *dev)
k_sem_init(&lis2dh->gpio_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&lis2dh->thread, lis2dh->thread_stack, CONFIG_LIS2DH_THREAD_STACK_SIZE,
(k_thread_entry_t)lis2dh_thread, lis2dh, NULL, NULL,
lis2dh_thread, lis2dh, NULL, NULL,
K_PRIO_COOP(CONFIG_LIS2DH_THREAD_PRIORITY), 0, K_NO_WAIT);
#elif defined(CONFIG_LIS2DH_TRIGGER_GLOBAL_THREAD)
lis2dh->work.handler = lis2dh_work_cb;

View File

@ -67,8 +67,13 @@ static void lis2ds12_handle_int(const struct device *dev)
}
#ifdef CONFIG_LIS2DS12_TRIGGER_OWN_THREAD
static void lis2ds12_thread(struct lis2ds12_data *data)
static void lis2ds12_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct lis2ds12_data *data = p1;
while (1) {
k_sem_take(&data->trig_sem, K_FOREVER);
lis2ds12_handle_int(data->dev);
@ -159,7 +164,7 @@ int lis2ds12_trigger_init(const struct device *dev)
k_thread_create(&data->thread, data->thread_stack,
CONFIG_LIS2DS12_THREAD_STACK_SIZE,
(k_thread_entry_t)lis2ds12_thread,
lis2ds12_thread,
data, NULL, NULL,
K_PRIO_COOP(CONFIG_LIS2DS12_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -301,8 +301,13 @@ static void lis2dw12_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_LIS2DW12_TRIGGER_OWN_THREAD
static void lis2dw12_thread(struct lis2dw12_data *lis2dw12)
static void lis2dw12_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct lis2dw12_data *lis2dw12 = p1;
while (1) {
k_sem_take(&lis2dw12->gpio_sem, K_FOREVER);
lis2dw12_handle_interrupt(lis2dw12->dev);
@ -451,7 +456,7 @@ int lis2dw12_init_interrupt(const struct device *dev)
k_thread_create(&lis2dw12->thread, lis2dw12->thread_stack,
CONFIG_LIS2DW12_THREAD_STACK_SIZE,
(k_thread_entry_t)lis2dw12_thread, lis2dw12,
lis2dw12_thread, lis2dw12,
NULL, NULL, K_PRIO_COOP(CONFIG_LIS2DW12_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_LIS2DW12_TRIGGER_GLOBAL_THREAD)

View File

@ -96,8 +96,13 @@ static void lis2mdl_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_LIS2MDL_TRIGGER_OWN_THREAD
static void lis2mdl_thread(struct lis2mdl_data *lis2mdl)
static void lis2mdl_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct lis2mdl_data *lis2mdl = p1;
while (1) {
k_sem_take(&lis2mdl->gpio_sem, K_FOREVER);
lis2mdl_handle_interrupt(lis2mdl->dev);
@ -131,7 +136,7 @@ int lis2mdl_init_interrupt(const struct device *dev)
k_sem_init(&lis2mdl->gpio_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&lis2mdl->thread, lis2mdl->thread_stack,
CONFIG_LIS2MDL_THREAD_STACK_SIZE,
(k_thread_entry_t)lis2mdl_thread, lis2mdl,
lis2mdl_thread, lis2mdl,
NULL, NULL, K_PRIO_COOP(CONFIG_LIS2MDL_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_LIS2MDL_TRIGGER_GLOBAL_THREAD)

View File

@ -87,8 +87,13 @@ static void lis3mdl_thread_cb(const struct device *dev)
}
#ifdef CONFIG_LIS3MDL_TRIGGER_OWN_THREAD
static void lis3mdl_thread(struct lis3mdl_data *drv_data)
static void lis3mdl_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct lis3mdl_data *drv_data = p1;
while (1) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
lis3mdl_thread_cb(drv_data->dev);
@ -140,7 +145,7 @@ int lis3mdl_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_LIS3MDL_THREAD_STACK_SIZE,
(k_thread_entry_t)lis3mdl_thread, drv_data,
lis3mdl_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_LIS3MDL_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_LIS3MDL_TRIGGER_GLOBAL_THREAD)

View File

@ -123,8 +123,13 @@ static void lps22hh_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_LPS22HH_TRIGGER_OWN_THREAD
static void lps22hh_thread(struct lps22hh_data *lps22hh)
static void lps22hh_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct lps22hh_data *lps22hh = p1;
while (1) {
k_sem_take(&lps22hh->intr_sem, K_FOREVER);
lps22hh_handle_interrupt(lps22hh->dev);
@ -187,7 +192,7 @@ int lps22hh_init_interrupt(const struct device *dev)
k_thread_create(&lps22hh->thread, lps22hh->thread_stack,
CONFIG_LPS22HH_THREAD_STACK_SIZE,
(k_thread_entry_t)lps22hh_thread, lps22hh,
lps22hh_thread, lps22hh,
NULL, NULL, K_PRIO_COOP(CONFIG_LPS22HH_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_LPS22HH_TRIGGER_GLOBAL_THREAD)

View File

@ -97,8 +97,12 @@ static void lsm6dsl_thread_cb(const struct device *dev)
}
#ifdef CONFIG_LSM6DSL_TRIGGER_OWN_THREAD
static void lsm6dsl_thread(const struct device *dev)
static void lsm6dsl_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
const struct device *dev = p1;
struct lsm6dsl_data *drv_data = dev->data;
while (1) {
@ -156,7 +160,7 @@ int lsm6dsl_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_LSM6DSL_THREAD_STACK_SIZE,
(k_thread_entry_t)lsm6dsl_thread, (void *)dev,
lsm6dsl_thread, (void *)dev,
NULL, NULL, K_PRIO_COOP(CONFIG_LSM6DSL_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_LSM6DSL_TRIGGER_GLOBAL_THREAD)

View File

@ -228,8 +228,13 @@ static void lsm6dso_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_LSM6DSO_TRIGGER_OWN_THREAD
static void lsm6dso_thread(struct lsm6dso_data *lsm6dso)
static void lsm6dso_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct lsm6dso_data *lsm6dso = p1;
while (1) {
k_sem_take(&lsm6dso->gpio_sem, K_FOREVER);
lsm6dso_handle_interrupt(lsm6dso->dev);
@ -265,7 +270,7 @@ int lsm6dso_init_interrupt(const struct device *dev)
k_thread_create(&lsm6dso->thread, lsm6dso->thread_stack,
CONFIG_LSM6DSO_THREAD_STACK_SIZE,
(k_thread_entry_t)lsm6dso_thread, lsm6dso,
lsm6dso_thread, lsm6dso,
NULL, NULL, K_PRIO_COOP(CONFIG_LSM6DSO_THREAD_PRIORITY),
0, K_NO_WAIT);
k_thread_name_set(&lsm6dso->thread, "lsm6dso");

View File

@ -256,8 +256,13 @@ static void lsm6dso16is_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_LSM6DSO16IS_TRIGGER_OWN_THREAD
static void lsm6dso16is_thread(struct lsm6dso16is_data *lsm6dso16is)
static void lsm6dso16is_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct lsm6dso16is_data *lsm6dso16is = p1;
while (1) {
k_sem_take(&lsm6dso16is->gpio_sem, K_FOREVER);
lsm6dso16is_handle_interrupt(lsm6dso16is->dev);
@ -293,7 +298,7 @@ int lsm6dso16is_init_interrupt(const struct device *dev)
k_thread_create(&lsm6dso16is->thread, lsm6dso16is->thread_stack,
CONFIG_LSM6DSO16IS_THREAD_STACK_SIZE,
(k_thread_entry_t)lsm6dso16is_thread, lsm6dso16is,
lsm6dso16is_thread, lsm6dso16is,
NULL, NULL, K_PRIO_COOP(CONFIG_LSM6DSO16IS_THREAD_PRIORITY),
0, K_NO_WAIT);
k_thread_name_set(&lsm6dso16is->thread, "lsm6dso16is");

View File

@ -256,8 +256,13 @@ static void lsm6dsv16x_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_LSM6DSV16X_TRIGGER_OWN_THREAD
static void lsm6dsv16x_thread(struct lsm6dsv16x_data *lsm6dsv16x)
static void lsm6dsv16x_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct lsm6dsv16x_data *lsm6dsv16x = p1;
while (1) {
k_sem_take(&lsm6dsv16x->gpio_sem, K_FOREVER);
lsm6dsv16x_handle_interrupt(lsm6dsv16x->dev);
@ -293,7 +298,7 @@ int lsm6dsv16x_init_interrupt(const struct device *dev)
k_thread_create(&lsm6dsv16x->thread, lsm6dsv16x->thread_stack,
CONFIG_LSM6DSV16X_THREAD_STACK_SIZE,
(k_thread_entry_t)lsm6dsv16x_thread, lsm6dsv16x,
lsm6dsv16x_thread, lsm6dsv16x,
NULL, NULL, K_PRIO_COOP(CONFIG_LSM6DSV16X_THREAD_PRIORITY),
0, K_NO_WAIT);
k_thread_name_set(&lsm6dsv16x->thread, "lsm6dsv16x");

View File

@ -80,8 +80,12 @@ static void lsm9ds0_gyro_gpio_drdy_callback(const struct device *dev,
k_sem_give(&data->sem);
}
static void lsm9ds0_gyro_thread_main(const struct device *dev)
static void lsm9ds0_gyro_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
const struct device *dev = p1;
struct lsm9ds0_gyro_data *data = dev->data;
while (1) {
@ -106,7 +110,7 @@ int lsm9ds0_gyro_init_interrupt(const struct device *dev)
k_thread_create(&data->thread, data->thread_stack,
CONFIG_LSM9DS0_GYRO_THREAD_STACK_SIZE,
(k_thread_entry_t)lsm9ds0_gyro_thread_main,
lsm9ds0_gyro_thread_main,
(void *)dev, NULL, NULL, K_PRIO_COOP(10), 0, K_NO_WAIT);
if (!gpio_is_ready_dt(&config->int_gpio)) {

View File

@ -129,8 +129,13 @@ static void alert_cb(const struct device *dev, struct gpio_callback *cb,
#ifdef CONFIG_MCP9808_TRIGGER_OWN_THREAD
static void mcp9808_thread_main(struct mcp9808_data *data)
static void mcp9808_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct mcp9808_data *data = p1;
while (true) {
k_sem_take(&data->sem, K_FOREVER);
process_int(data->dev);
@ -169,7 +174,7 @@ int mcp9808_setup_interrupt(const struct device *dev)
k_thread_create(&mcp9808_thread, mcp9808_thread_stack,
CONFIG_MCP9808_THREAD_STACK_SIZE,
(k_thread_entry_t)mcp9808_thread_main, data, NULL, NULL,
mcp9808_thread_main, data, NULL, NULL,
K_PRIO_COOP(CONFIG_MCP9808_THREAD_PRIORITY),
0, K_NO_WAIT);
#else /* CONFIG_MCP9808_TRIGGER_GLOBAL_THREAD */

View File

@ -77,8 +77,13 @@ static void mpu6050_thread_cb(const struct device *dev)
}
#ifdef CONFIG_MPU6050_TRIGGER_OWN_THREAD
static void mpu6050_thread(struct mpu6050_data *drv_data)
static void mpu6050_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct mpu6050_data *drv_data = p1;
while (1) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
mpu6050_thread_cb(drv_data->dev);
@ -131,7 +136,7 @@ int mpu6050_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_MPU6050_THREAD_STACK_SIZE,
(k_thread_entry_t)mpu6050_thread, drv_data,
mpu6050_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_MPU6050_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_MPU6050_TRIGGER_GLOBAL_THREAD)

View File

@ -94,8 +94,13 @@ static void mpu9250_thread_cb(const struct device *dev)
}
#ifdef CONFIG_MPU9250_TRIGGER_OWN_THREAD
static void mpu9250_thread(struct mpu9250_data *drv_data)
static void mpu9250_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct mpu9250_data *drv_data = p1;
while (1) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
mpu9250_thread_cb(drv_data->dev);
@ -160,7 +165,7 @@ int mpu9250_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_MPU9250_THREAD_STACK_SIZE,
(k_thread_entry_t)mpu9250_thread, drv_data,
mpu9250_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_MPU9250_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_MPU9250_TRIGGER_GLOBAL_THREAD)

View File

@ -162,8 +162,13 @@ static void sht3xd_thread_cb(const struct device *dev)
}
#ifdef CONFIG_SHT3XD_TRIGGER_OWN_THREAD
static void sht3xd_thread(struct sht3xd_data *data)
static void sht3xd_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct sht3xd_data *data = p1;
while (1) {
k_sem_take(&data->gpio_sem, K_FOREVER);
sht3xd_thread_cb(data->dev);
@ -238,7 +243,7 @@ int sht3xd_init_interrupt(const struct device *dev)
k_thread_create(&data->thread, data->thread_stack,
CONFIG_SHT3XD_THREAD_STACK_SIZE,
(k_thread_entry_t)sht3xd_thread, data,
sht3xd_thread, data,
NULL, NULL, K_PRIO_COOP(CONFIG_SHT3XD_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_SHT3XD_TRIGGER_GLOBAL_THREAD)

View File

@ -212,7 +212,7 @@ static int sm351lt_init(const struct device *dev)
k_thread_create(&data->thread, data->thread_stack,
CONFIG_SM351LT_THREAD_STACK_SIZE,
(k_thread_entry_t)sm351lt_thread, data, NULL,
sm351lt_thread, data, NULL,
NULL, K_PRIO_COOP(CONFIG_SM351LT_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -96,8 +96,13 @@ static void stts751_gpio_callback(const struct device *dev,
}
#ifdef CONFIG_STTS751_TRIGGER_OWN_THREAD
static void stts751_thread(struct stts751_data *stts751)
static void stts751_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct stts751_data *stts751 = p1;
while (1) {
k_sem_take(&stts751->gpio_sem, K_FOREVER);
stts751_handle_interrupt(stts751->dev);
@ -131,7 +136,7 @@ int stts751_init_interrupt(const struct device *dev)
k_thread_create(&stts751->thread, stts751->thread_stack,
CONFIG_STTS751_THREAD_STACK_SIZE,
(k_thread_entry_t)stts751_thread, stts751,
stts751_thread, stts751,
NULL, NULL, K_PRIO_COOP(CONFIG_STTS751_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_STTS751_TRIGGER_GLOBAL_THREAD)

View File

@ -98,8 +98,13 @@ static void sx9500_gpio_cb(const struct device *port,
k_sem_give(&data->sem);
}
static void sx9500_thread_main(struct sx9500_data *data)
static void sx9500_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct sx9500_data *data = p1;
while (1) {
k_sem_take(&data->sem, K_FOREVER);
sx9500_gpio_thread_cb(data->dev);
@ -170,7 +175,7 @@ int sx9500_setup_interrupt(const struct device *dev)
#ifdef CONFIG_SX9500_TRIGGER_OWN_THREAD
k_thread_create(&sx9500_thread, sx9500_thread_stack,
CONFIG_SX9500_THREAD_STACK_SIZE,
(k_thread_entry_t)sx9500_thread_main, data, 0, NULL,
sx9500_thread_main, data, 0, NULL,
K_PRIO_COOP(CONFIG_SX9500_THREAD_PRIORITY),
0, K_NO_WAIT);
#endif

View File

@ -149,8 +149,13 @@ static void tcn75a_gpio_callback(const struct device *dev, struct gpio_callback
}
#ifdef CONFIG_TCN75A_TRIGGER_OWN_THREAD
static void tcn75a_thread_main(struct tcn75a_data *data)
static void tcn75a_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct tcn75a_data *data = p1;
while (true) {
k_sem_take(&data->trig_sem, K_FOREVER);
tcn75a_handle_int(data->dev);
@ -193,7 +198,7 @@ int tcn75a_trigger_init(const struct device *dev)
#if defined(CONFIG_TCN75A_TRIGGER_OWN_THREAD)
k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&data->thread, data->thread_stack, CONFIG_TCN75A_THREAD_STACK_SIZE,
(k_thread_entry_t)tcn75a_thread_main, data, NULL, NULL,
tcn75a_thread_main, data, NULL, NULL,
K_PRIO_COOP(CONFIG_TCN75A_THREAD_PRIORITY), 0, K_NO_WAIT);
#elif defined(CONFIG_TCN75A_TRIGGER_GLOBAL_THREAD)
data->work.handler = tcn75a_work_handler;

View File

@ -105,8 +105,13 @@ static void tmp007_thread_cb(const struct device *dev)
}
#ifdef CONFIG_TMP007_TRIGGER_OWN_THREAD
static void tmp007_thread(struct tmp007_data *drv_data)
static void tmp007_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct tmp007_data *drv_data = p1;
while (1) {
k_sem_take(&drv_data->gpio_sem, K_FOREVER);
tmp007_thread_cb(drv_data->dev);
@ -185,7 +190,7 @@ int tmp007_init_interrupt(const struct device *dev)
k_thread_create(&drv_data->thread, drv_data->thread_stack,
CONFIG_TMP007_THREAD_STACK_SIZE,
(k_thread_entry_t)tmp007_thread, drv_data,
tmp007_thread, drv_data,
NULL, NULL, K_PRIO_COOP(CONFIG_TMP007_THREAD_PRIORITY),
0, K_NO_WAIT);
#elif defined(CONFIG_TMP007_TRIGGER_GLOBAL_THREAD)

View File

@ -81,8 +81,13 @@ static void tsl2540_process_int(const struct device *dev)
}
#ifdef CONFIG_TSL2540_TRIGGER_OWN_THREAD
static void tsl2540_thread_main(struct tsl2540_data *data)
static void tsl2540_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct tsl2540_data *data = p1;
while (true) {
k_sem_take(&data->trig_sem, K_FOREVER);
tsl2540_process_int(data->dev);
@ -189,7 +194,7 @@ int tsl2540_trigger_init(const struct device *dev)
#if defined(CONFIG_TSL2540_TRIGGER_OWN_THREAD)
k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&data->thread, data->thread_stack, CONFIG_TSL2540_THREAD_STACK_SIZE,
(k_thread_entry_t)tsl2540_thread_main, data, NULL, NULL,
tsl2540_thread_main, data, NULL, NULL,
K_PRIO_COOP(CONFIG_TSL2540_THREAD_PRIORITY), 0, K_NO_WAIT);
k_thread_name_set(&data->thread, "TSL2540 trigger");
#elif defined(CONFIG_TSL2540_TRIGGER_GLOBAL_THREAD)

View File

@ -86,8 +86,13 @@ static void vcnl4040_handle_int(const struct device *dev)
}
#ifdef CONFIG_VCNL4040_TRIGGER_OWN_THREAD
static void vcnl4040_thread_main(struct vcnl4040_data *data)
static void vcnl4040_thread_main(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct vcnl4040_data *data = p1;
while (true) {
k_sem_take(&data->trig_sem, K_FOREVER);
vcnl4040_handle_int(data->dev);
@ -266,7 +271,7 @@ int vcnl4040_trigger_init(const struct device *dev)
k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&data->thread, data->thread_stack,
CONFIG_VCNL4040_THREAD_STACK_SIZE,
(k_thread_entry_t)vcnl4040_thread_main,
vcnl4040_thread_main,
data, NULL, NULL,
K_PRIO_COOP(CONFIG_VCNL4040_THREAD_PRIORITY),
0, K_NO_WAIT);

View File

@ -89,8 +89,13 @@ static void hids_drdy_callback(const struct device *dev, struct gpio_callback *c
}
#ifdef CONFIG_WSEN_HIDS_TRIGGER_OWN_THREAD
static void hids_thread(struct hids_data *data)
static void hids_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct hids_data *data = p1;
while (true) {
k_sem_take(&data->drdy_sem, K_FOREVER);
hids_process_drdy_interrupt(data->dev);
@ -151,7 +156,7 @@ int hids_init_interrupt(const struct device *dev)
k_sem_init(&data->drdy_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&data->thread, data->thread_stack, CONFIG_WSEN_HIDS_THREAD_STACK_SIZE,
(k_thread_entry_t)hids_thread, data, NULL, NULL,
hids_thread, data, NULL, NULL,
K_PRIO_COOP(CONFIG_WSEN_HIDS_THREAD_PRIORITY), 0, K_NO_WAIT);
#elif defined(CONFIG_WSEN_HIDS_TRIGGER_GLOBAL_THREAD)
data->work.handler = hids_work_cb;

View File

@ -112,8 +112,13 @@ static void pads_drdy_callback(const struct device *dev, struct gpio_callback *c
}
#ifdef CONFIG_WSEN_PADS_TRIGGER_OWN_THREAD
static void pads_thread(struct pads_data *data)
static void pads_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct pads_data *data = p1;
while (true) {
k_sem_take(&data->drdy_sem, K_FOREVER);
pads_process_drdy_interrupt(data->dev);
@ -168,7 +173,7 @@ int pads_init_interrupt(const struct device *dev)
k_sem_init(&data->drdy_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&data->thread, data->thread_stack, CONFIG_WSEN_PADS_THREAD_STACK_SIZE,
(k_thread_entry_t)pads_thread, data, NULL, NULL,
pads_thread, data, NULL, NULL,
K_PRIO_COOP(CONFIG_WSEN_PADS_THREAD_PRIORITY), 0, K_NO_WAIT);
#elif defined(CONFIG_WSEN_PADS_TRIGGER_GLOBAL_THREAD)
data->work.handler = pads_work_cb;

View File

@ -118,8 +118,13 @@ static void tids_threshold_callback(const struct device *dev, struct gpio_callba
}
#ifdef CONFIG_WSEN_TIDS_TRIGGER_OWN_THREAD
static void tids_thread(struct tids_data *tids)
static void tids_thread(void *p1, void *p2, void *p3)
{
ARG_UNUSED(p2);
ARG_UNUSED(p3);
struct tids_data *tids = p1;
while (true) {
k_sem_take(&tids->threshold_sem, K_FOREVER);
tids_process_threshold_interrupt(tids->dev);
@ -226,7 +231,7 @@ int tids_init_interrupt(const struct device *dev)
k_sem_init(&data->threshold_sem, 0, K_SEM_MAX_LIMIT);
k_thread_create(&data->thread, data->thread_stack, CONFIG_WSEN_TIDS_THREAD_STACK_SIZE,
(k_thread_entry_t)tids_thread, data, NULL, NULL,
tids_thread, data, NULL, NULL,
K_PRIO_COOP(CONFIG_WSEN_TIDS_THREAD_PRIORITY), 0, K_NO_WAIT);
#elif defined(CONFIG_WSEN_TIDS_TRIGGER_GLOBAL_THREAD)
data->work.handler = tids_work_cb;