Home
last modified time | relevance | path

Searched full:context (Results 1 – 25 of 1321) sorted by relevance

12345678910>>...53

/Zephyr-latest/include/zephyr/net/
Dnet_context.h2 * @brief Network context definitions
18 * @brief Application network context
19 * @defgroup net_context Application network context
37 /** Is this context used or not */
42 /** State of the context (bits 1 & 2 in the flags) */
74 /** Context is bound to a specific interface */
85 * context is used here. Keep processing in the callback minimal to reduce the
88 * @param context The context to use.
99 typedef void (*net_context_recv_cb_t)(struct net_context *context,
111 * This callback is called by TX thread so its stack and execution context is
[all …]
Dnet_offload.h59 struct net_context **context);
64 int (*bind)(struct net_context *context,
72 int (*listen)(struct net_context *context, int backlog);
78 int (*connect)(struct net_context *context,
89 int (*accept)(struct net_context *context,
116 int (*recv)(struct net_context *context,
124 int (*put)(struct net_context *context);
128 * @brief Get a network socket/context from the offloaded IP stack.
140 * @param context The allocated context is returned to the caller.
148 struct net_context **context) in net_offload_get() argument
[all …]
/Zephyr-latest/drivers/i2c/
Di2c_bitbang.c42 int i2c_bitbang_configure(struct i2c_bitbang *context, uint32_t dev_config) in i2c_bitbang_configure() argument
52 context->delays[T_LOW] = NS_TO_SYS_CLOCK_HW_CYCLES(4700); in i2c_bitbang_configure()
53 context->delays[T_HIGH] = NS_TO_SYS_CLOCK_HW_CYCLES(4000); in i2c_bitbang_configure()
56 context->delays[T_LOW] = NS_TO_SYS_CLOCK_HW_CYCLES(1300); in i2c_bitbang_configure()
57 context->delays[T_HIGH] = NS_TO_SYS_CLOCK_HW_CYCLES(600); in i2c_bitbang_configure()
63 context->dev_config = dev_config; in i2c_bitbang_configure()
68 int i2c_bitbang_get_config(struct i2c_bitbang *context, uint32_t *config) in i2c_bitbang_get_config() argument
70 if (context->dev_config == 0) { in i2c_bitbang_get_config()
74 *config = context->dev_config; in i2c_bitbang_get_config()
79 static void i2c_set_scl(struct i2c_bitbang *context, int state) in i2c_set_scl() argument
[all …]
Di2c_sedi.c37 struct i2c_sedi_context *const context = dev->data; in i2c_sedi_api_configure() local
39 context->addr_10bit = (dev_config & I2C_ADDR_10_BITS) ? SEDI_I2C_ADDRESS_10BIT : 0; in i2c_sedi_api_configure()
53 k_mutex_lock(context->mutex, K_FOREVER); in i2c_sedi_api_configure()
54 ret = sedi_i2c_control(context->sedi_device, SEDI_I2C_BUS_SPEED, sedi_speed); in i2c_sedi_api_configure()
55 k_mutex_unlock(context->mutex); in i2c_sedi_api_configure()
68 struct i2c_sedi_context *context = dev->data; in i2c_sedi_api_full_io() local
75 k_mutex_lock(context->mutex, K_FOREVER); in i2c_sedi_api_full_io()
81 context->sedi_device, addr | context->addr_10bit, msgs[i].buf, in i2c_sedi_api_full_io()
85 context->sedi_device, addr | context->addr_10bit, msgs[i].buf, in i2c_sedi_api_full_io()
93 ret = k_sem_take(context->sem, K_MSEC(I2C_SEDI_TIMEOUT_MS)); in i2c_sedi_api_full_io()
[all …]
Di2c_gpio.c84 struct i2c_gpio_context *context = dev->data; in i2c_gpio_configure() local
87 k_mutex_lock(&context->mutex, K_FOREVER); in i2c_gpio_configure()
89 rc = i2c_bitbang_configure(&context->bitbang, dev_config); in i2c_gpio_configure()
91 k_mutex_unlock(&context->mutex); in i2c_gpio_configure()
98 struct i2c_gpio_context *context = dev->data; in i2c_gpio_get_config() local
101 k_mutex_lock(&context->mutex, K_FOREVER); in i2c_gpio_get_config()
103 rc = i2c_bitbang_get_config(&context->bitbang, config); in i2c_gpio_get_config()
108 k_mutex_unlock(&context->mutex); in i2c_gpio_get_config()
116 struct i2c_gpio_context *context = dev->data; in i2c_gpio_transfer() local
119 k_mutex_lock(&context->mutex, K_FOREVER); in i2c_gpio_transfer()
[all …]
/Zephyr-latest/subsys/net/ip/
Dnet_context.c2 * @brief Network context API
84 * from applications which are usually run in task context.
88 bool net_context_is_reuseaddr_set(struct net_context *context) in net_context_is_reuseaddr_set() argument
91 return context->options.reuseaddr; in net_context_is_reuseaddr_set()
97 bool net_context_is_reuseport_set(struct net_context *context) in net_context_is_reuseport_set() argument
100 return context->options.reuseport; in net_context_is_reuseport_set()
106 bool net_context_is_v6only_set(struct net_context *context) in net_context_is_v6only_set() argument
109 if (context == NULL) { in net_context_is_v6only_set()
113 return context->options.ipv6_v6only; in net_context_is_v6only_set()
115 ARG_UNUSED(context); in net_context_is_v6only_set()
[all …]
Dtcp_internal.h42 * @brief Calculates and returns the MSS for a given TCP context
44 * @param tcp TCP context
61 * @brief Obtains the state for a TCP context
63 * @param tcp TCP context
96 * @brief Initialize TCP parts of a context
98 * @param context Network context
103 int net_tcp_get(struct net_context *context);
105 static inline int net_tcp_get(struct net_context *context) in net_tcp_get() argument
107 ARG_UNUSED(context); in net_tcp_get()
116 * @param context Network context
[all …]
Dtcp.h17 * - The incoming data is delivered up through the context->recv_cb
41 * @param context Network context
45 int net_tcp_get(struct net_context *context);
50 * @param context Network context
54 int net_tcp_put(struct net_context *context);
59 * @param context Network context
63 int net_tcp_listen(struct net_context *context);
68 * @param context Network context
74 int net_tcp_accept(struct net_context *context, net_tcp_accept_cb_t cb,
77 /* TODO: split into 2 functions, conn -> context, queue -> send? */
[all …]
/Zephyr-latest/drivers/ethernet/nxp_enet/
Deth_mcux.c241 static void eth_mcux_phy_enter_reset(struct eth_context *context);
242 void eth_mcux_phy_stop(struct eth_context *context);
340 static void eth_mcux_phy_enter_reset(struct eth_context *context) in eth_mcux_phy_enter_reset() argument
344 ENET_StartSMIWrite(context->base, context->phy_addr, in eth_mcux_phy_enter_reset()
349 context->phy_state = eth_mcux_phy_state_reset; in eth_mcux_phy_enter_reset()
351 k_work_submit(&context->phy_work); in eth_mcux_phy_enter_reset()
355 static void eth_mcux_phy_start(struct eth_context *context) in eth_mcux_phy_start() argument
358 LOG_DBG("%s phy_state=%s", eth_name(context->base), in eth_mcux_phy_start()
359 phy_state_name(context->phy_state)); in eth_mcux_phy_start()
362 context->enabled = true; in eth_mcux_phy_start()
[all …]
/Zephyr-latest/tests/modules/thrift/ThriftTest/src/
Dclient.cpp16 #include "context.hpp"
26 context.client->testVoid(); in ZTEST()
32 context.client->testString(s, "Test"); in ZTEST()
38 zassert_equal(false, context.client->testBool(false), ""); in ZTEST()
39 zassert_equal(true, context.client->testBool(true), ""); in ZTEST()
44 zassert_equal(0, context.client->testByte(0), ""); in ZTEST()
45 zassert_equal(-1, context.client->testByte(-1), ""); in ZTEST()
46 zassert_equal(42, context.client->testByte(42), ""); in ZTEST()
47 zassert_equal(-42, context.client->testByte(-42), ""); in ZTEST()
48 zassert_equal(127, context.client->testByte(127), ""); in ZTEST()
[all …]
/Zephyr-latest/subsys/net/l2/openthread/
Dopenthread_utils.c29 static bool is_mesh_local(struct openthread_context *context, in is_mesh_local() argument
33 otThreadGetMeshLocalPrefix(context->instance); in is_mesh_local()
38 int pkt_list_add(struct openthread_context *context, struct net_pkt *pkt) in pkt_list_add() argument
40 uint16_t i_idx = context->pkt_list_in_idx; in pkt_list_add()
42 if (context->pkt_list_full) { in pkt_list_add()
51 if (i_idx == context->pkt_list_out_idx) { in pkt_list_add()
52 context->pkt_list_full = 1U; in pkt_list_add()
55 context->pkt_list[context->pkt_list_in_idx].pkt = pkt; in pkt_list_add()
56 context->pkt_list_in_idx = i_idx; in pkt_list_add()
61 void pkt_list_remove_first(struct openthread_context *context) in pkt_list_remove_first() argument
[all …]
Dopenthread_utils.h22 void add_ipv6_addr_to_zephyr(struct openthread_context *context);
23 void add_ipv6_addr_to_ot(struct openthread_context *context,
25 void add_ipv6_maddr_to_ot(struct openthread_context *context,
27 void add_ipv6_maddr_to_zephyr(struct openthread_context *context);
28 void rm_ipv6_addr_from_zephyr(struct openthread_context *context);
29 void rm_ipv6_maddr_from_zephyr(struct openthread_context *context);
31 int pkt_list_add(struct openthread_context *context, struct net_pkt *pkt);
32 struct net_pkt *pkt_list_peek(struct openthread_context *context);
33 void pkt_list_remove_last(struct openthread_context *context);
34 void pkt_list_remove_first(struct openthread_context *context);
[all …]
/Zephyr-latest/subsys/net/lib/lwm2m/
Dlwm2m_pull_context.c45 } context; variable
67 /* Clean up the current socket context */ in pull_service()
68 lwm2m_engine_stop(&context.firmware_ctx); in pull_service()
86 * Close all open connections and release the context semaphore
106 msg = lwm2m_get_message(&context.firmware_ctx); in transfer_request()
128 if (strncmp(context.uri, "http", 4) == 0) { in transfer_request()
130 } else if (strncmp(context.uri, "coap", 4) == 0) { in transfer_request()
145 ret = http_parser_parse_url(context.uri, strlen(context.uri), 0, &parser); in transfer_request()
147 LOG_ERR("Invalid firmware url: %s", context.uri); in transfer_request()
155 cursor = context.uri + off; in transfer_request()
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/
Dmsg.h9 * Sends a model message with the given context. If the message context is NULL, this
13 * @param ctx Message context, or NULL to send with the configured publish parameters.
17 * @retval -ENOTSUP A message context was not provided and publishing is not supported.
18 * @retval -EADDRNOTAVAIL A message context was not provided and publishing is not configured.
25 * Message response context.
28 struct bt_mesh_msg_ack_ctx *ack; /**< Acknowledged message context. */
36 * Sends a model message with the given context. If the message context is NULL, this
39 * If a response context is provided, the call blocks for the time specified in
40 * the response context, or until @ref bt_mesh_msg_ack_ctx_rx is called.
43 * @param ctx Message context, or NULL to send with the configured publish parameters.
[all …]
/Zephyr-latest/subsys/testsuite/ztest/include/zephyr/
Dztress.h23 /** @internal Internal ID's to distinguish context type. */
36 /** @brief Descriptor of a k_timer handler execution context.
38 * The handler is executed in the k_timer handler context which typically means
39 * interrupt context. This context will preempt any other used in the set.
41 * @note There can only be up to one k_timer context in the set and it must be the
58 /** @brief Descriptor of a thread execution context.
60 * The handler is executed in the thread context. The priority of the thread is
73 * @param preempt_cnt Number of preemptions of that context to complete the test.
85 * @param user_data User data provided in the context descriptor.
92 * @param prio Context priority counting from 0 which indicates the highest priority.
[all …]
/Zephyr-latest/samples/bluetooth/channel_sounding/src/
Ddistance_estimation.c173 struct processing_context *context = (struct processing_context *)user_data; in process_step_data() local
179 if (context->local_steps) { in process_step_data()
180 for (uint8_t i = 0; i < (context->n_ap + 1); i++) { in process_step_data()
186 mode_2_data[context->mode_2_data_index].channel = step->channel; in process_step_data()
187 mode_2_data[context->mode_2_data_index].antenna_permutation = in process_step_data()
189 mode_2_data[context->mode_2_data_index].local_iq_sample = in process_step_data()
196 mode_2_data[context->mode_2_data_index].failed = true; in process_step_data()
199 context->mode_2_data_index++; in process_step_data()
202 for (uint8_t i = 0; i < (context->n_ap + 1); i++) { in process_step_data()
208 mode_2_data[context->mode_2_data_index].peer_iq_sample = in process_step_data()
[all …]
/Zephyr-latest/tests/net/context/src/
Dmain.c77 struct net_context *context; in ZTEST() local
80 ret = net_context_get(AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP, &context); in ZTEST()
84 ret = net_context_get(AF_INET6, 10, IPPROTO_UDP, &context); in ZTEST()
86 "Invalid context type test failed "); in ZTEST()
88 ret = net_context_get(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6, &context); in ZTEST()
90 "Invalid context protocol test failed"); in ZTEST()
92 ret = net_context_get(99, SOCK_DGRAM, IPPROTO_UDP, &context); in ZTEST()
94 "Invalid context family test failed"); in ZTEST()
96 ret = net_context_get(AF_INET6, SOCK_STREAM, IPPROTO_TCP, &context); in ZTEST()
98 "Invalid context proto type test failed"); in ZTEST()
[all …]
/Zephyr-latest/drivers/wifi/eswifi/
Deswifi_offload.c23 static int eswifi_off_bind(struct net_context *context, in eswifi_off_bind() argument
27 struct eswifi_off_socket *socket = context->offload_context; in eswifi_off_bind()
28 struct eswifi_dev *eswifi = eswifi_by_iface_idx(context->iface); in eswifi_off_bind()
39 static int eswifi_off_listen(struct net_context *context, int backlog) in eswifi_off_listen() argument
41 struct eswifi_off_socket *socket = context->offload_context; in eswifi_off_listen()
42 struct eswifi_dev *eswifi = eswifi_by_iface_idx(context->iface); in eswifi_off_listen()
70 struct net_context *context; in eswifi_off_connect_work() local
81 context = socket->context; in eswifi_off_connect_work()
87 net_context_set_state(socket->context, NET_CONTEXT_CONNECTED); in eswifi_off_connect_work()
95 cb(context, err, user_data); in eswifi_off_connect_work()
[all …]
/Zephyr-latest/arch/x86/core/ia32/
Dfloat.c13 * in a thread's stack region when a preemptive context switch occurs.
21 * the floating point context is unconditionally saved/restored with every
22 * context switch.
73 * @brief Save non-integer context information
75 * This routine saves the system's "live" non-integer context into the
89 * @brief Save non-integer context information
91 * This routine saves the system's "live" non-integer context into the
105 * @brief Initialize floating point register context information.
115 * @brief Initialize SSE register context information.
125 * Save a thread's floating point context information.
[all …]
/Zephyr-latest/drivers/ethernet/
Deth_enc424j600.c223 struct enc424j600_runtime *context = in enc424j600_gpio_callback() local
226 k_sem_give(&context->int_sem); in enc424j600_gpio_callback()
310 struct enc424j600_runtime *context = dev->data; in enc424j600_tx() local
317 k_sem_take(&context->tx_rx_sem, K_FOREVER); in enc424j600_tx()
342 k_sem_give(&context->tx_rx_sem); in enc424j600_tx()
349 struct enc424j600_runtime *context = dev->data; in enc424j600_rx() local
358 k_sem_take(&context->tx_rx_sem, K_FOREVER); in enc424j600_rx()
361 context->next_pkt_ptr); in enc424j600_rx()
375 context->next_pkt_ptr = sys_get_le16(&info[0]); in enc424j600_rx()
379 context->next_pkt_ptr, frm_len, status); in enc424j600_rx()
[all …]
/Zephyr-latest/tests/drivers/uart/uart_mix_fifo_poll/
DREADME.txt3 from higher priority context, uart_fifo_fill called from UART interrupt context
4 and uart_tx called from higher priority context. Preemptions shall not lead to
7 This test is establishing 3 context from which uart_poll_out is called:
10 - k_timer timeout context
12 From each context stream of data is being sent. Bytes in streams are encoded as
/Zephyr-latest/tests/subsys/logging/log_backend_init/src/
Dmain.c43 struct backend_context *context = (struct backend_context *)backend->cb->ctx; in backend_process() local
52 zassert_equal(strcmp(str, context->exp_str[context->cnt]), 0, in backend_process()
53 "Unexpected string %s (exp:%s)", str, context->exp_str[context->cnt]); in backend_process()
55 context->cnt++; in backend_process()
66 struct backend_context *context = (struct backend_context *)ctx; in expire_cb() local
68 context->active = true; in expire_cb()
73 struct backend_context *context = (struct backend_context *)backend->cb->ctx; in backend_init() local
75 k_timer_init(&context->timer, expire_cb, NULL); in backend_init()
76 k_timer_user_data_set(&context->timer, (void *)context); in backend_init()
77 k_timer_start(&context->timer, K_MSEC(context->delay), K_NO_WAIT); in backend_init()
[all …]
/Zephyr-latest/drivers/modem/
Dmodem_receiver.h44 * @brief Gets receiver context by id.
46 * @param id: receiver context id.
48 * @retval Receiver context or NULL.
55 * @param ctx: receiver context.
66 * @brief Sends the data over specified receiver context.
68 * @param ctx: receiver context.
78 * @brief Registers receiver context.
80 * @note Acquires receivers device, and prepares the context to be used.
82 * @param ctx: receiver context to register.
83 * @param uart_dev: communication device for the receiver context.
/Zephyr-latest/drivers/interrupt_controller/
Dintc_cavs.c29 struct cavs_registers *get_base_address(struct cavs_ictl_runtime *context) in get_base_address() argument
32 return UINT_TO_POINTER(context->base_addr + in get_base_address()
35 return UINT_TO_POINTER(context->base_addr); in get_base_address()
56 struct cavs_ictl_runtime *context = port->data; in cavs_ictl_isr() local
60 volatile struct cavs_registers * const regs = get_base_address(context); in cavs_ictl_isr()
69 struct cavs_ictl_runtime *context = dev->data; in cavs_ictl_irq_enable() local
71 volatile struct cavs_registers * const regs = get_base_address(context); in cavs_ictl_irq_enable()
79 struct cavs_ictl_runtime *context = dev->data; in cavs_ictl_irq_disable() local
81 volatile struct cavs_registers * const regs = get_base_address(context); in cavs_ictl_irq_disable()
88 struct cavs_ictl_runtime *context = dev->data; in cavs_ictl_irq_get_state() local
[all …]
/Zephyr-latest/subsys/net/lib/shell/
Dnet_shell.c85 void get_addresses(struct net_context *context, in get_addresses() argument
89 if (IS_ENABLED(CONFIG_NET_IPV6) && context->local.family == AF_INET6) { in get_addresses()
92 net_sin6_ptr(&context->local)->sin6_addr), in get_addresses()
93 ntohs(net_sin6_ptr(&context->local)->sin6_port)); in get_addresses()
96 &net_sin6(&context->remote)->sin6_addr), in get_addresses()
97 ntohs(net_sin6(&context->remote)->sin6_port)); in get_addresses()
99 } else if (IS_ENABLED(CONFIG_NET_IPV4) && context->local.family == AF_INET) { in get_addresses()
102 net_sin_ptr(&context->local)->sin_addr), in get_addresses()
103 ntohs(net_sin_ptr(&context->local)->sin_port)); in get_addresses()
107 net_sin(&context->remote)->sin_family == AF_INET6 && in get_addresses()
[all …]

12345678910>>...53