Home
last modified time | relevance | path

Searched +full:n +full:- +full:th (Results 1 – 25 of 48) sorted by relevance

12

/Zephyr-Core-3.6.0/dts/bindings/gpio/
Dxlnx,xps-gpio-1.00.a.yaml3 compatible: "xlnx,xps-gpio-1.00.a"
5 include: [gpio-controller.yaml, base.yaml]
7 bus: xlnx,xps-gpio-1.00.a
10 # https://github.com/Xilinx/device-tree-xlnx
16 xlnx,all-inputs:
21 xlnx,all-outputs:
26 xlnx,dout-default:
29 Default output value. If n-th bit is 1, GPIO-n default value is 1.
31 xlnx,gpio-width:
36 xlnx,tri-default:
[all …]
/Zephyr-Core-3.6.0/tests/subsys/fs/fcb/src/
Dfcb_test_last_of_n.c5 * SPDX-License-Identifier: Apache-2.0
21 fcb->f_scratch_cnt = 1U; in ZTEST()
32 if (rc == -ENOSPC) { in ZTEST()
36 rc = flash_area_write(fcb->fap, FCB_ENTRY_FA_DATA_OFF(loc), in ZTEST()
52 "fcb_offset_last_n: fetched wrong n-th location"); in ZTEST()
60 "fcb_offset_last_n: fetched wrong n-th location"); in ZTEST()
68 "fcb_offset_last_n: fetched wrong n-th location"); in ZTEST()
76 "fcb_offset_last_n: fetched wrong n-th location"); in ZTEST()
/Zephyr-Core-3.6.0/tests/posix/common/src/
Dmutex.c4 * SPDX-License-Identifier: Apache-2.0
32 TC_PRINT("mutex lock is taken\n"); in normal_mutex_entry()
41 TC_PRINT("recursive mutex lock is taken\n"); in recursive_mutex_entry()
49 pthread_t th; in test_mutex_common() local
70 zassert_ok(pthread_create(&th, NULL, entry, NULL)); in test_mutex_common()
75 zassert_ok(pthread_join(th, NULL)); in test_mutex_common()
122 for (; i > 0; --i) { in ZTEST()
123 zassert_ok(pthread_mutex_destroy(&m[i - 1]), "failed to destroy mutex %zu", i - 1); in ZTEST()
153 ts->tv_nsec += ms * NSEC_PER_MSEC; in timespec_add_ms()
154 oflow = ts->tv_nsec >= NSEC_PER_SEC; in timespec_add_ms()
[all …]
Dpthread.c2 * Copyright (c) 2018-2023 Intel Corporation
4 * SPDX-License-Identifier: Apache-2.0
21 #define PTHREAD_CANCEL_INVALID -1
22 #define SCHED_INVALID -1
23 #define PRIO_INVALID -1
24 #define PTHREAD_INVALID -1
65 printk("Thread %d starting with scheduling policy %d & priority %d\n", in thread_top_exec()
67 /* Try a double-lock here to exercise the failing case of in thread_top_exec()
74 printk("pthread_mutex_trylock inexplicably succeeded\n"); in thread_top_exec()
103 printk("Racing bounce threads\n"); in thread_top_exec()
[all …]
Dpthread_attr.c4 * SPDX-License-Identifier: Apache-2.0
38 pthread_t th; in create_thread_common() local
45 zassert_ok(pthread_create(&th, attrp, thread_entry, UINT_TO_POINTER(joinable))); in create_thread_common()
47 zassert_not_ok(pthread_create(&th, attrp, thread_entry, UINT_TO_POINTER(joinable))); in create_thread_common()
52 zassert_ok(pthread_join(th, NULL), "failed to join joinable thread"); in create_thread_common()
57 zassert_not_ok(pthread_join(th, NULL)); in create_thread_common()
132 /* can re-initialize a destroyed attr */ in ZTEST()
350 zassert_ok(pthread_attr_setstack(&attr, stackaddr, stacksize - 1)); in ZTEST()
354 zassert_equal(new_stacksize, stacksize - 1); in ZTEST()
426 zassert_ok(pthread_attr_setstacksize(&attr, stacksize - 1)); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/kernel/threads/dynamic_thread_stack/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
33 printk("Hello, dynamic world!\n"); in func()
38 /** @brief Exercise the pool-based thread stack allocator */
42 static struct k_thread th[CONFIG_DYNAMIC_THREAD_POOL_SIZE]; in ZTEST() local
71 tid[i] = k_thread_create(&th[i], stack[i], in ZTEST()
89 /** @brief Exercise the heap-based thread stack allocator */
92 size_t N; in ZTEST() local
94 static struct k_thread th[MAX_HEAP_STACKS]; in ZTEST() local
106 for (N = 0; N < MAX_HEAP_STACKS; ++N) { in ZTEST()
107 stack[N] = k_thread_stack_alloc(CONFIG_DYNAMIC_THREAD_STACK_SIZE, in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/lib/c_lib/thrd/src/
Dmtx.c4 * SPDX-License-Identifier: Apache-2.0
23 static thrd_t th; variable
114 printk("Expecting timedlock with timeout of %d ms to fail\n", TIMEDLOCK_TIMEOUT_MS); in ZTEST()
116 zassert_equal(thrd_success, thrd_create(&th, mtx_timedlock_fn, &mutex)); in ZTEST()
117 zassert_equal(thrd_success, thrd_join(th, &ret)); in ZTEST()
121 printk("Expecting timedlock with timeout of %d ms to succeed after 100ms\n", in ZTEST()
123 zassert_equal(thrd_success, thrd_create(&th, mtx_timedlock_fn, &mutex)); in ZTEST()
127 zassert_equal(thrd_success, thrd_join(th, &ret)); in ZTEST()
149 zassert_equal(thrd_success, thrd_create(&th, mtx_trylock_fn, &mutex)); in ZTEST()
150 zassert_equal(thrd_success, thrd_join(th, &ret)); in ZTEST()
/Zephyr-Core-3.6.0/tests/posix/eventfd/src/
Dstress.c4 * SPDX-License-Identifier: Apache-2.0
26 static struct k_thread th[2]; variable
68 ret = op[id](fixture->fd); in th_fun()
70 zassert_true(ret == 0 || (ret == -1 && errno == EAGAIN), in th_fun()
77 printk("%zu %s\n", count[id], msg[id]); in th_fun()
84 printk("avg: %zu %s/s\n", (size_t)((count[id] * MSEC_PER_SEC) / end_ms), msg[id]); in th_fun()
93 printk("BOARD: %s\n", CONFIG_BOARD); in ZTEST_F()
94 printk("TEST_DURATION_S: %u\n", CONFIG_TEST_DURATION_S); in ZTEST_F()
95 printk("UPDATE_INTERVAL_S: %u\n", UPDATE_INTERVAL_S); in ZTEST_F()
97 reopen(&fixture->fd, 0, EFD_NONBLOCK | EFD_SEMAPHORE); in ZTEST_F()
[all …]
/Zephyr-Core-3.6.0/samples/subsys/nvs/src/
Dmain.c10 * 1. A string representing an IP-address: stored at id=1, data="192.168.1.1"
23 * At the 10th reboot the string item with id=4 is deleted (or marked for
26 * At the 11th reboot the string item with id=4 can no longer be read with the
30 * At the 78th reboot the first sector is full and a new sector is taken into
37 * SPDX-License-Identifier: Apache-2.0
83 printk("Flash device %s is not ready\n", fs.flash_device->name); in main()
89 printk("Unable to get page info\n"); in main()
97 printk("Flash Init failed\n"); in main()
107 printk("Id: %d, Address: %s\n", ADDRESS_ID, buf); in main()
110 printk("No address found, adding %s at id %d\n", buf, in main()
[all …]
/Zephyr-Core-3.6.0/tests/benchmarks/sched/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
70 /* #define stamp(s) printk("%s @ %d\n", #s, _stamp(s)) */
79 printk("Running %p\n", k_current_get()); in partner_fn()
94 int partner_prio = main_prio - 1; in main()
96 k_tid_t th = k_thread_create(&partner_thread, partner_stack, in main() local
111 z_ready_thread(th); in main()
123 uint32_t avg, whole = stamps[4] - stamps[0]; in main()
132 avg = tot / (runs - 10); in main()
139 * !USERSPACE and SCHED_DUMB and using -icount in main()
144 printk("unpend %4d ready %4d switch %4d pend %4d tot %4d (avg %4d)\n", in main()
[all …]
/Zephyr-Core-3.6.0/arch/xtensa/core/
Dcrt1.S3 * SPDX-License-Identifier: Apache-2.0
7 * Control arrives here at _start from the reset vector or from crt0-app.S.
36 # define ARG4 a5 /* 4th outgoing call argument */
37 # define ARG5 a6 /* 5th outgoing call argument */
44 # define ARG4 a9 /* 4th outgoing call argument */
45 # define ARG5 a10 /* 5th outgoing call argument */
53 * _start is typically NOT at the beginning of the text segment --
55 * code that does equivalent initialization (such as crt0-app.S).
58 * - low (level-one) and medium priority interrupts are disabled
60 * - C calling context not initialized:
[all …]
/Zephyr-Core-3.6.0/subsys/mgmt/osdp/src/
Dosdp_sc.c4 * SPDX-License-Identifier: Apache-2.0
39 memcpy(scbk, pd->sc.pd_client_uid, 8); in osdp_compute_scbk()
41 scbk[i] = ~scbk[i - 8]; in osdp_compute_scbk()
56 osdp_compute_scbk(pd, ctx->sc_master_key, scbk); in osdp_compute_session_keys()
58 memcpy(scbk, pd->sc.scbk, 16); in osdp_compute_session_keys()
62 memset(pd->sc.s_enc, 0, 16); in osdp_compute_session_keys()
63 memset(pd->sc.s_mac1, 0, 16); in osdp_compute_session_keys()
64 memset(pd->sc.s_mac2, 0, 16); in osdp_compute_session_keys()
66 pd->sc.s_enc[0] = 0x01; in osdp_compute_session_keys()
67 pd->sc.s_enc[1] = 0x82; in osdp_compute_session_keys()
[all …]
/Zephyr-Core-3.6.0/drivers/sensor/adxl367/
Dadxl367.c4 * SPDX-License-Identifier: Apache-2.0
29 * @param dev - The device structure.
30 * @param th - Structure holding the activity threshold information:
37 const struct adxl367_activity_threshold *th) in adxl367_setup_activity_detection() argument
39 struct adxl367_data *data = dev->data; in adxl367_setup_activity_detection()
43 ret = data->hw_tf->write_reg_mask(dev, ADXL367_ACT_INACT_CTL, in adxl367_setup_activity_detection()
46 FIELD_PREP(ADXL367_ACT_INACT_CTL_ACT_EN_MSK, th->enable) | in adxl367_setup_activity_detection()
48 th->referenced)); in adxl367_setup_activity_detection()
53 ret = data->hw_tf->write_reg_mask(dev, ADXL367_THRESH_ACT_H, ADXL367_THRESH_H_MSK, in adxl367_setup_activity_detection()
54 FIELD_PREP(ADXL367_THRESH_H_MSK, th->value >> 6)); in adxl367_setup_activity_detection()
[all …]
/Zephyr-Core-3.6.0/drivers/cache/
Dcache_aspeed.c4 * SPDX-License-Identifier: Apache-2.0
14 * 0: no-cache
19 * bit[22]: 23th 32KB from 0x000a_8000 to 0x000a_ffff
20 * bit[23]: 24th 32KB from 0x000b_0000 to 0x000b_ffff
28 #define CACHED_SRAM_END (CACHED_SRAM_ADDR + CACHED_SRAM_SIZE - 1)
55 /* set all cache areas to no-cache by default */ in aspeed_cache_init()
59 max_bit = 8 * sizeof(uint32_t) - 1; in aspeed_cache_init()
70 * @param [IN] addr - start address to be invalidated
71 * @param [IN] size - size in byte
72 * @param [OUT] p_aligned_addr - pointer to the cacheline aligned address variable
[all …]
/Zephyr-Core-3.6.0/arch/arm64/core/
Dfpu.c5 * SPDX-License-Identifier: Apache-2.0
31 static void DBG(char *msg, struct k_thread *th) in DBG() argument
37 buf[3] = '0' + _current_cpu->id; in DBG()
39 strcat(buf, _current->name); in DBG()
43 strcat(buf, th->name); in DBG()
46 v = *(unsigned char *)&th->arch.saved_fp_context; in DBG()
49 *p++ = ((v >> 4) < 10) ? ((v >> 4) + '0') : ((v >> 4) - 10 + 'a'); in DBG()
50 *p++ = ((v & 15) < 10) ? ((v & 15) + '0') : ((v & 15) - 10 + 'a'); in DBG()
51 *p++ = '\n'; in DBG()
54 k_str_out(buf, p - buf); in DBG()
[all …]
/Zephyr-Core-3.6.0/tests/subsys/logging/log_syst/src/
Dmock_backend.c4 * SPDX-License-Identifier: Apache-2.0
35 length--; in char_out()
37 zassert_not_equal(pos_in_buf, sizeof(test_output_buf)-1, in char_out()
54 log_output_func(&log_output_mock, &msg->log, flags); in process()
57 bool is_kth_bit_set(int n, int k) in is_kth_bit_set() argument
59 return ((n & (1 << (k - 1))) != 0); in is_kth_bit_set()
66 const char *raw_data_str = "SYS-T RAW DATA: "; in validate_msg()
71 /* Validate "SYS-T RAW DATA: " prefix in the output_str */ in validate_msg()
77 /* Validate the headers in the SYS-T data format */ in validate_msg()
89 * 3rd bit = Sys-t Checksum, 4th bit = Sys-t Timestamp. Support for validating the in validate_msg()
/Zephyr-Core-3.6.0/arch/riscv/core/
Dfpu.c5 * SPDX-License-Identifier: Apache-2.0
26 * RISC-V even if -mabi is used with f or d so this precaution might be
32 static void DBG(char *msg, struct k_thread *th) in DBG() argument
38 buf[3] = '0' + _current_cpu->id; in DBG()
39 buf[8] = '0' + _current->arch.exception_depth; in DBG()
40 strcat(buf, _current->name); in DBG()
44 strcat(buf, th->name); in DBG()
46 v = *(unsigned char *)&th->arch.saved_fp_context; in DBG()
49 *p++ = ((v >> 4) < 10) ? ((v >> 4) + '0') : ((v >> 4) - 10 + 'a'); in DBG()
50 *p++ = ((v & 15) < 10) ? ((v & 15) + '0') : ((v & 15) - 10 + 'a'); in DBG()
[all …]
/Zephyr-Core-3.6.0/arch/arm/core/
Dgdbstub.c4 * SPDX-License-Identifier: Apache-2.0
12 /* Position of each register in the packet - n-th register in the ctx.registers array needs to be
13 * the packet_pos[n]-th byte of the g (read all registers) packet. See struct arm_register_names in
14 * GDB file gdb/arm-tdep.c, which defines these positions.
30 int ist = ((ctx.registers[SPSR] & BIT(SPSR_J)) >> (SPSR_J - 1)) | in is_bkpt()
52 ctx.registers[R0] = esf->basic.r0; in z_gdb_entry()
53 ctx.registers[R1] = esf->basic.r1; in z_gdb_entry()
54 ctx.registers[R2] = esf->basic.r2; in z_gdb_entry()
55 ctx.registers[R3] = esf->basic.r3; in z_gdb_entry()
57 ctx.registers[R4] = esf->extra_info.callee->v1; in z_gdb_entry()
[all …]
/Zephyr-Core-3.6.0/tests/kernel/sched/preempt/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
24 #error Preemption test requires single-CPU operation
101 /* A little bit of white-box inspection: check that all the in wakeup_src_thread()
105 k_tid_t th = &worker_threads[i]; in wakeup_src_thread() local
109 str = k_thread_state_str(th, buffer, sizeof(buffer)); in wakeup_src_thread()
118 while (do_sleep && !(src_thread->base.thread_state & _THREAD_PENDING)) { in wakeup_src_thread()
163 #define PRI(n) (worker_priorities[n]) argument
289 zassert_true(k_uptime_get() - start > 0, in worker()
318 priority = K_LOWEST_APPLICATION_THREAD_PRIO - 1; in ZTEST()
/Zephyr-Core-3.6.0/samples/modules/tflite-micro/hello_world/train/
Dtrain_hello_world_model.ipynb23 "# Train a Simple TensorFlow Lite for Microcontrollers model\n",
24 "\n",
25 …kB model using TensorFlow and converting it for use with TensorFlow Lite for Microcontrollers. \n",
26 "\n",
27 …e) function. This will result in a model that can take a value, `x`, and predict its sine, `y`.\n",
28 "\n",
29 …nsorFlow Lite for MicroControllers](https://www.tensorflow.org/lite/microcontrollers/overview).\n",
30 "\n",
31 "<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
32 " <td>\n",
[all …]
/Zephyr-Core-3.6.0/tests/boards/intel_adsp/ssp/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
87 TC_PRINT("tx callback status %d\n", status); in dma_callback()
89 TC_PRINT("tx giving up\n"); in dma_callback()
97 TC_PRINT("rx callback status %d\n", status); in dma_callback_rx()
99 TC_PRINT("rx giving xfer_sem\n"); in dma_callback_rx()
106 dma_cfg.dma_slot = props->dma_hs_id; in config_output_dma()
123 TC_PRINT("Platform does not support dma request channel\n"); in config_output_dma()
124 return -1; in config_output_dma()
131 dma_block_cfgs[i].dest_address = props->fifo_address; in config_output_dma()
132 TC_PRINT("dma block %d block_size %d, source addr %x, dest addr %x\n", in config_output_dma()
[all …]
/Zephyr-Core-3.6.0/drivers/mipi_dbi/
Dmipi_dbi_spi.c4 * SPDX-License-Identifier: Apache-2.0
31 /* Expands to 1 if the node does not have the `write-only` property */
32 #define _WRITE_ONLY_ABSENT(n) (!DT_INST_PROP(n, write_only)) | argument
34 /* This macro will evaluate to 1 if any of the nodes with zephyr,mipi-dbi-spi
35 * lack a `write-only` property. The intention here is to allow the entire
41 /* In Type C mode 1 MIPI BIT communication, the 9th bit of the word
53 const struct mipi_dbi_spi_config *config = dev->config; in mipi_dbi_spi_write_helper()
54 struct mipi_dbi_spi_data *data = dev->data; in mipi_dbi_spi_write_helper()
61 k_spinlock_key_t spinlock_key = k_spin_lock(&data->lock); in mipi_dbi_spi_write_helper()
63 if (dbi_config->mode == MIPI_DBI_MODE_SPI_3WIRE && in mipi_dbi_spi_write_helper()
[all …]
/Zephyr-Core-3.6.0/kernel/
Dsched.c4 * SPDX-License-Identifier: Apache-2.0
67 return thread->base.preempt <= _PREEMPT_THRESHOLD; in is_preempt()
78 return (thread->base.prio - K_HIGHEST_THREAD_PRIO) in is_metairq()
89 return (thread->base.thread_state & _THREAD_DUMMY) != 0U; in is_thread_dummy()
95 * > 0 -> thread 1 priority > thread 2 priority
96 * = 0 -> thread 1 priority == thread 2 priority
97 * < 0 -> thread 1 priority < thread 2 priority
105 int32_t b1 = thread_1->base.prio; in z_sched_prio_cmp()
106 int32_t b2 = thread_2->base.prio; in z_sched_prio_cmp()
109 return b2 - b1; in z_sched_prio_cmp()
[all …]
/Zephyr-Core-3.6.0/subsys/bluetooth/controller/util/
Dmemq.c2 * Copyright (c) 2016-2017 Nordic Semiconductor ASA
5 * SPDX-License-Identifier: Apache-2.0
9 * FIFO-style "memory queue" permitting enqueue at tail and dequeue from head.
12 * Implemented as a singly-linked list, with always one-more element.
13 * The linked list must always contain at least one link-element, as emptiness
15 * For a queue to be valid, it must be initialized with an initial link-element.
20 * link-element, but the link-element before it!
23 * ------------------------+-------------------------------
24 * memq_init(I,H,T) | H -> I[] <- T
25 * memq_enqueue(A,a,T); | H -> I[a] -> A[] <- T
[all …]
/Zephyr-Core-3.6.0/include/zephyr/drivers/misc/ft8xx/
Dft8xx_reference_api.h4 * SPDX-License-Identifier: Apache-2.0
111 /** Co-processor widget is drawn in 3D effect */
113 /** Co-processor option to decode the JPEG image to RGB565 format */
115 /** Co-processor option to decode the JPEG image to L8 format, i.e., monochrome */
119 /** Co-processor widget is drawn without 3D effect */
123 /** Co-processor widget centers horizontally */
125 /** Co-processor widget centers vertically */
127 /** Co-processor widget centers horizontally and vertically */
131 /** Co-processor widget has no background drawn */
133 /** Co-processor clock widget is drawn without hour ticks.
[all …]

12