Home
last modified time | relevance | path

Searched refs:target (Results 1 – 25 of 1434) sorted by relevance

12345678910>>...58

/Zephyr-latest/include/zephyr/sys/
Datomic_builtin.h23 static inline bool atomic_cas(atomic_t *target, atomic_val_t old_value, in atomic_cas() argument
26 return __atomic_compare_exchange_n(target, &old_value, new_value, in atomic_cas()
31 static inline bool atomic_ptr_cas(atomic_ptr_t *target, atomic_ptr_val_t old_value, in atomic_ptr_cas() argument
34 return __atomic_compare_exchange_n(target, &old_value, new_value, in atomic_ptr_cas()
39 static inline atomic_val_t atomic_add(atomic_t *target, atomic_val_t value) in atomic_add() argument
41 return __atomic_fetch_add(target, value, __ATOMIC_SEQ_CST); in atomic_add()
44 static inline atomic_val_t atomic_sub(atomic_t *target, atomic_val_t value) in atomic_sub() argument
46 return __atomic_fetch_sub(target, value, __ATOMIC_SEQ_CST); in atomic_sub()
49 static inline atomic_val_t atomic_inc(atomic_t *target) in atomic_inc() argument
51 return atomic_add(target, 1); in atomic_inc()
[all …]
Datomic_c.h20 __syscall bool atomic_cas(atomic_t *target, atomic_val_t old_value,
23 __syscall bool atomic_ptr_cas(atomic_ptr_t *target, atomic_ptr_val_t old_value,
26 __syscall atomic_val_t atomic_add(atomic_t *target, atomic_val_t value);
28 __syscall atomic_val_t atomic_sub(atomic_t *target, atomic_val_t value);
30 static inline atomic_val_t atomic_inc(atomic_t *target) in atomic_inc() argument
32 return atomic_add(target, 1); in atomic_inc()
36 static inline atomic_val_t atomic_dec(atomic_t *target) in atomic_dec() argument
38 return atomic_sub(target, 1); in atomic_dec()
42 atomic_val_t atomic_get(const atomic_t *target);
44 atomic_ptr_val_t atomic_ptr_get(const atomic_ptr_t *target);
[all …]
Datomic_arch.h18 bool atomic_cas(atomic_t *target, atomic_val_t old_value,
21 bool atomic_ptr_cas(atomic_ptr_t *target, void *old_value,
24 atomic_val_t atomic_add(atomic_t *target, atomic_val_t value);
26 atomic_val_t atomic_sub(atomic_t *target, atomic_val_t value);
28 atomic_val_t atomic_inc(atomic_t *target);
30 atomic_val_t atomic_dec(atomic_t *target);
32 atomic_val_t atomic_get(const atomic_t *target);
34 void *atomic_ptr_get(const atomic_ptr_t *target);
36 atomic_val_t atomic_set(atomic_t *target, atomic_val_t value);
38 void *atomic_ptr_set(atomic_ptr_t *target, void *value);
[all …]
Datomic.h127 static inline bool atomic_test_bit(const atomic_t *target, int bit) in atomic_test_bit() argument
129 atomic_val_t val = atomic_get(ATOMIC_ELEM(target, bit)); in atomic_test_bit()
147 static inline bool atomic_test_and_clear_bit(atomic_t *target, int bit) in atomic_test_and_clear_bit() argument
152 old = atomic_and(ATOMIC_ELEM(target, bit), ~mask); in atomic_test_and_clear_bit()
170 static inline bool atomic_test_and_set_bit(atomic_t *target, int bit) in atomic_test_and_set_bit() argument
175 old = atomic_or(ATOMIC_ELEM(target, bit), mask); in atomic_test_and_set_bit()
191 static inline void atomic_clear_bit(atomic_t *target, int bit) in atomic_clear_bit() argument
195 (void)atomic_and(ATOMIC_ELEM(target, bit), ~mask); in atomic_clear_bit()
209 static inline void atomic_set_bit(atomic_t *target, int bit) in atomic_set_bit() argument
213 (void)atomic_or(ATOMIC_ELEM(target, bit), mask); in atomic_set_bit()
[all …]
/Zephyr-latest/kernel/
Datomic_c.c43 static inline atomic_val_t z_vrfy_##name(atomic_t *target) \
45 K_OOPS(K_SYSCALL_MEMORY_WRITE(target, sizeof(atomic_t))); \
46 return z_impl_##name((atomic_t *)target); \
50 static inline atomic_val_t z_vrfy_##name(atomic_t *target, \
53 K_OOPS(K_SYSCALL_MEMORY_WRITE(target, sizeof(atomic_t))); \
54 return z_impl_##name((atomic_t *)target, value); \
81 bool z_impl_atomic_cas(atomic_t *target, atomic_val_t old_value, in z_impl_atomic_cas() argument
97 if (*target == old_value) { in z_impl_atomic_cas()
98 *target = new_value; in z_impl_atomic_cas()
108 bool z_vrfy_atomic_cas(atomic_t *target, atomic_val_t old_value, in z_vrfy_atomic_cas() argument
[all …]
/Zephyr-latest/tests/kernel/common/src/
Datomic.c101 atomic_t target, orig; in ZTEST_USER() local
112 target = 4; in ZTEST_USER()
117 zassert_false(atomic_cas(&target, oldvalue, value), "atomic_cas"); in ZTEST_USER()
118 target = 6; in ZTEST_USER()
119 zassert_true(atomic_cas(&target, oldvalue, value), "atomic_cas"); in ZTEST_USER()
120 zassert_true((target == value), "atomic_cas"); in ZTEST_USER()
134 target = 1; in ZTEST_USER()
136 zassert_true((atomic_add(&target, value) == 1), "atomic_add"); in ZTEST_USER()
137 zassert_true((target == 3), "atomic_add"); in ZTEST_USER()
139 target = 2; in ZTEST_USER()
[all …]
/Zephyr-latest/include/zephyr/drivers/
Demul_sensor.h30 int (*set_channel)(const struct emul *target, struct sensor_chan_spec ch,
33 int (*get_sample_range)(const struct emul *target, struct sensor_chan_spec ch, q31_t *lower,
36 int (*set_attribute)(const struct emul *target, struct sensor_chan_spec ch,
39 int (*get_attribute_metadata)(const struct emul *target, struct sensor_chan_spec ch,
54 static inline bool emul_sensor_backend_is_supported(const struct emul *target) in emul_sensor_backend_is_supported() argument
56 return target && target->backend_api; in emul_sensor_backend_is_supported()
71 static inline int emul_sensor_backend_set_channel(const struct emul *target, in emul_sensor_backend_set_channel() argument
75 if (!target || !target->backend_api) { in emul_sensor_backend_set_channel()
79 struct emul_sensor_driver_api *api = (struct emul_sensor_driver_api *)target->backend_api; in emul_sensor_backend_set_channel()
82 return api->set_channel(target, ch, value, shift); in emul_sensor_backend_set_channel()
[all …]
Demul_bbram.h28 int (*set_data)(const struct emul *target, size_t offset, size_t count,
31 int (*get_data)(const struct emul *target, size_t offset, size_t count, uint8_t *data);
49 static inline int emul_bbram_backend_set_data(const struct emul *target, size_t offset, in emul_bbram_backend_set_data() argument
52 if (target == NULL || target->backend_api == NULL) { in emul_bbram_backend_set_data()
56 struct emul_bbram_driver_api *api = (struct emul_bbram_driver_api *)target->backend_api; in emul_bbram_backend_set_data()
62 return api->set_data(target, offset, count, data); in emul_bbram_backend_set_data()
76 static inline int emul_bbram_backend_get_data(const struct emul *target, size_t offset, in emul_bbram_backend_get_data() argument
79 if (target == NULL || target->backend_api == NULL) { in emul_bbram_backend_get_data()
83 struct emul_bbram_driver_api *api = (struct emul_bbram_driver_api *)target->backend_api; in emul_bbram_backend_get_data()
89 return api->get_data(target, offset, count, data); in emul_bbram_backend_get_data()
Demul_fuel_gauge.h57 __syscall int emul_fuel_gauge_set_battery_charging(const struct emul *target, uint32_t uV, int uA);
58 static inline int z_impl_emul_fuel_gauge_set_battery_charging(const struct emul *target, in z_impl_emul_fuel_gauge_set_battery_charging() argument
62 (const struct fuel_gauge_emul_driver_api *)target->backend_api; in z_impl_emul_fuel_gauge_set_battery_charging()
68 return backend_api->set_battery_charging(target, uV, uA); in z_impl_emul_fuel_gauge_set_battery_charging()
80 __syscall int emul_fuel_gauge_is_battery_cutoff(const struct emul *target, bool *cutoff);
81 static inline int z_impl_emul_fuel_gauge_is_battery_cutoff(const struct emul *target, bool *cutoff) in z_impl_emul_fuel_gauge_is_battery_cutoff() argument
84 (const struct fuel_gauge_emul_driver_api *)target->backend_api; in z_impl_emul_fuel_gauge_is_battery_cutoff()
89 return backend_api->is_battery_cutoff(target, cutoff); in z_impl_emul_fuel_gauge_is_battery_cutoff()
Di3c.h647 struct i3c_device_desc *target);
663 struct i3c_device_desc *target,
679 struct i3c_device_desc *target);
694 struct i3c_i2c_device_desc *target);
709 struct i3c_i2c_device_desc *target);
752 struct i3c_device_desc *target,
800 struct i3c_device_desc *target);
815 struct i3c_device_desc *target);
1345 struct i3c_device_desc **target,
1448 int i3c_attach_i3c_device(struct i3c_device_desc *target);
[all …]
/Zephyr-latest/include/zephyr/arch/riscv/
Datomic.h21 static ALWAYS_INLINE atomic_val_t atomic_swap(const atomic_t *target, atomic_val_t newval) in atomic_swap() argument
27 : "r"(newval), "A"(*target) in atomic_swap()
33 static ALWAYS_INLINE atomic_val_t atomic_max(atomic_t *target, atomic_val_t value) in atomic_max() argument
39 : "r"(value), "A"(*target) in atomic_max()
45 static ALWAYS_INLINE atomic_val_t atomic_min(atomic_t *target, atomic_val_t value) in atomic_min() argument
51 : "r"(value), "A"(*target) in atomic_min()
57 static ALWAYS_INLINE atomic_val_t atomic_maxu(unsigned long *target, unsigned long value) in atomic_maxu() argument
63 : "r"(value), "A"(*target) in atomic_maxu()
69 static ALWAYS_INLINE atomic_val_t atomic_minu(unsigned long *target, unsigned long value) in atomic_minu() argument
75 : "r"(value), "A"(*target) in atomic_minu()
[all …]
/Zephyr-latest/include/zephyr/arch/xtensa/
Datomic_xtensa.h18 static ALWAYS_INLINE atomic_val_t atomic_get(const atomic_t *target) in atomic_get() argument
29 : "=r"(ret) : "r"(target) : "memory"); in atomic_get()
62 bool atomic_cas(atomic_t *target, atomic_val_t oldval, atomic_val_t newval) in atomic_cas() argument
64 return oldval == xtensa_cas(target, oldval, newval); in atomic_cas()
69 bool atomic_ptr_cas(atomic_ptr_t *target, void *oldval, void *newval) in atomic_ptr_cas() argument
72 == xtensa_cas((atomic_t *) target, (atomic_val_t) oldval, in atomic_ptr_cas()
84 cur = *target; \
85 res = xtensa_cas(target, cur, (expr)); \
91 atomic_val_t atomic_set(atomic_t *target, atomic_val_t value) in atomic_set() argument
98 atomic_val_t atomic_add(atomic_t *target, atomic_val_t value) in atomic_add() argument
[all …]
/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/
Dstate_binding.c56 if (ctl->light->target > 0 && in constrain_target_lightness2()
57 ctl->light->target < ctl->light->range_min) { in constrain_target_lightness2()
59 ctl->light->target = 0U; in constrain_target_lightness2()
61 ctl->light->target = ctl->light->range_min; in constrain_target_lightness2()
63 } else if (ctl->light->target > ctl->light->range_max) { in constrain_target_lightness2()
64 ctl->light->target = ctl->light->range_max; in constrain_target_lightness2()
118 ctl->light->target = 0U; in set_target()
121 ctl->light->target = ctl->light->last; in set_target()
123 ctl->light->target = ctl->light->def; in set_target()
129 ctl->light->target = *((int16_t *) dptr) - INT16_MIN; in set_target()
[all …]
/Zephyr-latest/subsys/net/lib/shell/
Dcm.c113 struct cm_target *target) in parse_ifi_target() argument
134 target->iface = net_if_get_by_index(iface_index); in parse_ifi_target()
136 if (target->iface == NULL) { in parse_ifi_target()
142 target->type = CM_TARG_IFACE; in parse_ifi_target()
146 target->type = CM_TARG_INVALID; in parse_ifi_target()
151 struct cm_target *target) in parse_if_target() argument
163 target->iface = net_if_get_by_index(net_if_get_by_name(arg)); in parse_if_target()
165 if (target->iface == NULL) { in parse_if_target()
171 target->type = CM_TARG_IFACE; in parse_if_target()
179 target->type = CM_TARG_INVALID; in parse_if_target()
[all …]
/Zephyr-latest/tests/drivers/sensor/adltc2990/src/
Dmain.c58 const struct emul *target; member
65 .target = EMUL_DT_GET(DT_NODELABEL(adltc2990_0_0)), in adltc2990_0_0_setup()
69 zassert_not_null(fixture.target); in adltc2990_0_0_setup()
77 adltc2990_emul_reset(fixture->target); in adltc2990_0_0_before()
96 const struct emul *target; member
103 .target = EMUL_DT_GET(DT_NODELABEL(adltc2990_4_3)), in adltc2990_4_3_setup()
107 zassert_not_null(fixture.target); in adltc2990_4_3_setup()
115 adltc2990_emul_reset(fixture->target); in adltc2990_4_3_before()
136 const struct emul *target; member
143 .target = EMUL_DT_GET(DT_NODELABEL(adltc2990_1_3)), in adltc2990_1_3_setup()
[all …]
/Zephyr-latest/tests/subsys/emul/src/
Demul_tester.h13 int (*set_action)(const struct emul *target, int action);
14 int (*get_action)(const struct emul *target, int *action);
17 static inline int emul_tester_backend_set_action(const struct emul *target, int action) in emul_tester_backend_set_action() argument
20 (const struct emul_tester_backend_api *)target->backend_api; in emul_tester_backend_set_action()
22 return api->set_action(target, action); in emul_tester_backend_set_action()
25 static inline int emul_tester_backend_get_action(const struct emul *target, int *action) in emul_tester_backend_get_action() argument
28 (const struct emul_tester_backend_api *)target->backend_api; in emul_tester_backend_get_action()
30 return api->get_action(target, action); in emul_tester_backend_get_action()
Demul_tester.c25 static int emul_tester_set_action(const struct emul *target, int action) in emul_tester_set_action() argument
27 const struct emul_tester_cfg *cfg = target->cfg; in emul_tester_set_action()
28 struct emul_tester_data *data = target->data; in emul_tester_set_action()
35 static int emul_tester_get_action(const struct emul *target, int *action) in emul_tester_get_action() argument
37 struct emul_tester_data *data = target->data; in emul_tester_get_action()
44 static int emul_tester_transfer(const struct emul *target, struct i2c_msg *msgs, int num_msgs, in emul_tester_transfer() argument
47 ARG_UNUSED(target); in emul_tester_transfer()
64 static int emul_tester_init(const struct emul *target, const struct device *parent) in emul_tester_init() argument
66 ARG_UNUSED(target); in emul_tester_init()
/Zephyr-latest/tests/arch/riscv/atomic/src/
Dmain.c35 atomic_t target; in ZTEST_USER() local
43 target = 21; in ZTEST_USER()
45 zassert_true((atomic_swap(&target, value) == 21), "atomic_swap"); in ZTEST_USER()
46 zassert_true((target == 7), "atomic_swap"); in ZTEST_USER()
49 target = 5; in ZTEST_USER()
51 zassert_true((atomic_max(&target, value) == 5), "atomic_max"); in ZTEST_USER()
52 zassert_true((target == 5), "atomic_max"); in ZTEST_USER()
55 target = 5; in ZTEST_USER()
57 zassert_true((atomic_min(&target, value) == 5), "atomic_min"); in ZTEST_USER()
58 zassert_true((target == -8), "atomic_min"); in ZTEST_USER()
/Zephyr-latest/drivers/i3c/
Di3c_common.c21 uint8_t num_msgs, struct i3c_device_desc *target) in i3c_dump_msgs() argument
23 LOG_DBG("I3C msg: %s, addr=%x", name, target->dynamic_addr); in i3c_dump_msgs()
237 int i3c_attach_i3c_device(struct i3c_device_desc *target) in i3c_attach_i3c_device() argument
239 struct i3c_driver_data *data = (struct i3c_driver_data *)target->bus->data; in i3c_attach_i3c_device()
240 const struct i3c_driver_api *api = (const struct i3c_driver_api *)target->bus->api; in i3c_attach_i3c_device()
246 I3C_BUS_FOR_EACH_I3CDEV(target->bus, i3c_desc) { in i3c_attach_i3c_device()
247 if (i3c_desc == target) { in i3c_attach_i3c_device()
252 addr = target->dynamic_addr ? target->dynamic_addr : target->static_addr; in i3c_attach_i3c_device()
263 sys_slist_append(&data->attached_dev.devices.i3c, &target->node); in i3c_attach_i3c_device()
266 status = api->attach_i3c_device(target->bus, target); in i3c_attach_i3c_device()
[all …]
Di3c_ccc.c18 int i3c_ccc_do_getbcr(struct i3c_device_desc *target, in i3c_ccc_do_getbcr() argument
24 __ASSERT_NO_MSG(target != NULL); in i3c_ccc_do_getbcr()
25 __ASSERT_NO_MSG(target->bus != NULL); in i3c_ccc_do_getbcr()
28 ccc_tgt_payload.addr = target->dynamic_addr; in i3c_ccc_do_getbcr()
38 return i3c_do_ccc(target->bus, &ccc_payload); in i3c_ccc_do_getbcr()
41 int i3c_ccc_do_getdcr(struct i3c_device_desc *target, in i3c_ccc_do_getdcr() argument
47 __ASSERT_NO_MSG(target != NULL); in i3c_ccc_do_getdcr()
48 __ASSERT_NO_MSG(target->bus != NULL); in i3c_ccc_do_getdcr()
51 ccc_tgt_payload.addr = target->dynamic_addr; in i3c_ccc_do_getdcr()
61 return i3c_do_ccc(target->bus, &ccc_payload); in i3c_ccc_do_getdcr()
[all …]
/Zephyr-latest/scripts/west_commands/zspdx/
Dcmakefileapijson.py136 cfgTarget.target = parseTarget(os.path.join(replyDir, cfgTarget.jsonFile))
138 cfgTarget.target = None
149 target = zspdx.cmakefileapi.Target()
151 target.name = js.get("name", "")
152 target.id = js.get("id", "")
153 target.type = parseTargetType(js.get("type", "UNKNOWN"))
154 target.backtrace = js.get("backtrace", -1)
155 target.folder = js.get("folder", "")
159 target.paths_source = paths_dict.get("source", "")
160 target.paths_build = paths_dict.get("build", "")
[all …]
/Zephyr-latest/drivers/sensor/bosch/bma4xx/
Dbma4xx_emul.c35 void bma4xx_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val, in bma4xx_emul_set_reg() argument
38 struct bma4xx_emul_data *data = target->data; in bma4xx_emul_set_reg()
44 void bma4xx_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val, size_t count) in bma4xx_emul_get_reg() argument
46 struct bma4xx_emul_data *data = target->data; in bma4xx_emul_get_reg()
52 uint8_t bma4xx_emul_get_interrupt_config(const struct emul *target, uint8_t *int1_io_ctrl, in bma4xx_emul_get_interrupt_config() argument
55 struct bma4xx_emul_data *data = target->data; in bma4xx_emul_get_interrupt_config()
62 static int bma4xx_emul_read_byte(const struct emul *target, int reg, uint8_t *val, int bytes) in bma4xx_emul_read_byte() argument
64 bma4xx_emul_get_reg(target, reg, val, bytes); in bma4xx_emul_read_byte()
69 static int bma4xx_emul_write_byte(const struct emul *target, int reg, uint8_t val, int bytes) in bma4xx_emul_write_byte() argument
71 struct bma4xx_emul_data *data = target->data; in bma4xx_emul_write_byte()
[all …]
/Zephyr-latest/drivers/sensor/asahi_kasei/akm09918c/
Dakm09918c_emul.c31 void akm09918c_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val, in akm09918c_emul_set_reg() argument
34 struct akm09918c_emul_data *data = target->data; in akm09918c_emul_set_reg()
40 void akm09918c_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val, size_t count) in akm09918c_emul_get_reg() argument
42 struct akm09918c_emul_data *data = target->data; in akm09918c_emul_get_reg()
48 void akm09918c_emul_reset(const struct emul *target) in akm09918c_emul_reset() argument
50 struct akm09918c_emul_data *data = target->data; in akm09918c_emul_reset()
57 static int akm09918c_emul_handle_write(const struct emul *target, uint8_t regn, uint8_t value) in akm09918c_emul_handle_write() argument
59 struct akm09918c_emul_data *data = target->data; in akm09918c_emul_handle_write()
67 akm09918c_emul_reset(target); in akm09918c_emul_handle_write()
74 static int akm09918c_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in akm09918c_emul_transfer_i2c() argument
[all …]
/Zephyr-latest/drivers/sensor/adi/adltc2990/
Dadltc2990_emul.c31 void adltc2990_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val) in adltc2990_emul_set_reg() argument
33 struct adltc2990_emul_data *data = target->data; in adltc2990_emul_set_reg()
39 void adltc2990_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val) in adltc2990_emul_get_reg() argument
41 struct adltc2990_emul_data *data = target->data; in adltc2990_emul_get_reg()
47 void adltc2990_emul_reset(const struct emul *target) in adltc2990_emul_reset() argument
49 struct adltc2990_emul_data *data = target->data; in adltc2990_emul_reset()
54 static int adltc2990_emul_handle_write(const struct emul *target, uint8_t regn, uint8_t value) in adltc2990_emul_handle_write() argument
56 struct adltc2990_emul_data *data = target->data; in adltc2990_emul_handle_write()
73 static int adltc2990_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in adltc2990_emul_transfer_i2c() argument
76 struct adltc2990_emul_data *data = target->data; in adltc2990_emul_transfer_i2c()
[all …]
/Zephyr-latest/drivers/i2c/
Di2c_mcux_flexcomm.c212 struct mcux_flexcomm_target_data *target; in mcux_flexcomm_find_free_target() local
216 target = &data->target_data[i]; in mcux_flexcomm_find_free_target()
217 if (!target->target_attached) { in mcux_flexcomm_find_free_target()
218 return target; in mcux_flexcomm_find_free_target()
227 struct mcux_flexcomm_target_data *target; in mcux_flexcomm_find_target_by_address() local
231 target = &data->target_data[i]; in mcux_flexcomm_find_target_by_address()
232 if (target->target_attached && target->target_cfg->address == address) { in mcux_flexcomm_find_target_by_address()
233 return target; in mcux_flexcomm_find_target_by_address()
240 struct mcux_flexcomm_target_data *target, bool disabled) in mcux_flexcomm_setup_i2c_config_address() argument
247 if (data->target_data[i].target_attached && &data->target_data[i] == target) { in mcux_flexcomm_setup_i2c_config_address()
[all …]

12345678910>>...58