1 /*
2  * Copyright (c) 2018 Nordic Semiconductor ASA
3  * Copyright (c) 2016 Intel Corporation
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 
9 #include <zephyr/kernel.h>
10 #include <zephyr/ztest.h>
11 
12 extern const struct device *get_adc_device(void);
13 extern struct k_poll_signal async_sig;
14 
adc_basic_setup(void)15 void *adc_basic_setup(void)
16 {
17 	k_object_access_grant(get_adc_device(), k_current_get());
18 #ifdef CONFIG_ADC_ASYNC
19 	k_object_access_grant(&async_sig, k_current_get());
20 	k_poll_signal_init(&async_sig);
21 	k_thread_system_pool_assign(k_current_get());
22 #endif
23 
24 	return NULL;
25 }
26 
27 ZTEST_SUITE(adc_basic, NULL, adc_basic_setup, NULL, NULL, NULL);
28