/Zephyr-latest/dts/bindings/gpio/ |
D | xlnx,xps-gpio-1.00.a.yaml | 3 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-latest/tests/kernel/threads/dynamic_thread_stack/src/ |
D | main.c | 4 * SPDX-License-Identifier: Apache-2.0 33 printk("Hello, dynamic world!\n"); in func() 42 struct k_thread *th; in ZTEST_USER() local 60 th = k_object_alloc(K_OBJ_THREAD); in ZTEST_USER() 61 zassert_not_null(th); in ZTEST_USER() 63 tid = k_thread_create(th, stack, CONFIG_DYNAMIC_THREAD_STACK_SIZE, func, in ZTEST_USER() 74 /** @brief Exercise the pool-based thread stack allocator */ 78 static struct k_thread th[CONFIG_DYNAMIC_THREAD_POOL_SIZE]; in ZTEST() local 107 tid[i] = k_thread_create(&th[i], stack[i], in ZTEST() 125 /** @brief Exercise the heap-based thread stack allocator */ [all …]
|
/Zephyr-latest/tests/subsys/fs/fcb/src/ |
D | fcb_test_last_of_n.c | 5 * 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-latest/tests/posix/common/src/ |
D | pthread.c | 2 * 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 …]
|
D | mutex.c | 4 * 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 79 zassert_ok(pthread_create(&th, NULL, entry, NULL)); in test_mutex_common() 84 zassert_ok(pthread_join(th, NULL)); in test_mutex_common() 143 for (; i > 0; --i) { in ZTEST() 144 zassert_ok(pthread_mutex_destroy(&m[i - 1]), "failed to destroy mutex %zu", i - 1); in ZTEST() 174 ts->tv_nsec += ms * NSEC_PER_MSEC; in timespec_add_ms() 175 oflow = ts->tv_nsec >= NSEC_PER_SEC; in timespec_add_ms() [all …]
|
D | pthread_attr.c | 4 * SPDX-License-Identifier: Apache-2.0 39 pthread_t th; in create_thread_common_entry() local 46 zassert_ok(pthread_create(&th, attrp, entry, arg)); in create_thread_common_entry() 48 zassert_not_ok(pthread_create(&th, attrp, entry, arg)); in create_thread_common_entry() 53 zassert_ok(pthread_join(th, NULL), "failed to join joinable thread"); in create_thread_common_entry() 58 zassert_not_ok(pthread_join(th, NULL)); in create_thread_common_entry() 139 /* can re-initialize a destroyed attr */ in ZTEST() 403 TC_PRINT("Unable to allocate large stack of size %zu (skipping)\n", expect_size); in ZTEST() 461 int pmin = -1; in ZTEST() 462 int pmax = -1; in ZTEST() [all …]
|
/Zephyr-latest/tests/lib/c_lib/thrd/src/ |
D | mtx.c | 4 * 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-latest/tests/posix/eventfd/src/ |
D | stress.c | 4 * 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-latest/samples/posix/env/src/ |
D | main.c | 4 * SPDX-License-Identifier: Apache-2.0 35 printf("%s\n", *envp); in env() 52 if (getenv_r("ALERT", alert_msg_buf, sizeof(alert_msg_buf) - 1) < 0 || in entry() 56 printf("ALERT=%s\n", alert_msg_buf); in entry() 65 pthread_t th; in main() local 68 return pthread_create(&th, NULL, entry, NULL); in main()
|
/Zephyr-latest/samples/subsys/nvs/src/ |
D | main.c | 10 * 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, rc=%d\n", rc); in main() 97 printk("Flash Init failed, rc=%d\n", rc); 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-latest/tests/benchmarks/sched/src/ |
D | main.c | 4 * SPDX-License-Identifier: Apache-2.0 40 static struct k_thread busy_thread[CONFIG_MP_MAX_NUM_CPUS - 1]; 44 static K_THREAD_STACK_ARRAY_DEFINE(busy_thread_stack, CONFIG_MP_MAX_NUM_CPUS - 1, 81 /* #define stamp(s) printk("%s @ %d\n", #s, _stamp(s)) */ 90 printk("Running %p\n", k_current_get()); in partner_fn() 112 for (uint32_t i = 0; i < CONFIG_MP_MAX_NUM_CPUS - 1; i++) { in main() 123 int partner_prio = main_prio - 1; in main() 125 k_tid_t th = k_thread_create(&partner_thread, partner_stack, in main() local 144 z_ready_thread(th); in main() 156 uint32_t avg, whole = stamps[4] - stamps[0]; in main() [all …]
|
/Zephyr-latest/soc/espressif/common/ |
D | Kconfig.flash | 2 # SPDX-License-Identifier: Apache-2.0 36 modules, please don't disable this, otherwise your flash may not work in 4-bit 60 bool "TH" 63 Enable this to support auto detection of TH chips if chip vendor not directly 82 to flash on ESP32-D2WD; (2) main SPI flash is connected to non-default pins; (3) main 125 default n
|
/Zephyr-latest/arch/xtensa/core/ |
D | crt1.S | 3 * SPDX-License-Identifier: Apache-2.0 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 -- 58 * - low (level-one) and medium priority interrupts are disabled 60 * - C calling context not initialized: 61 * - PS not initialized 62 * - SP not initialized [all …]
|
D | mmu.c | 3 * SPDX-License-Identifier: Apache-2.0 8 #include <xtensa/config/core-isa.h> 37 regs->rasid = (XTENSA_MMU_SHARED_ASID << 24) | in compute_regs() 41 regs->ptevaddr = CONFIG_XTENSA_MMU_PTEVADDR + user_asid * 0x400000; in compute_regs() 44 l1_page[XTENSA_MMU_L1_POS(regs->ptevaddr)] = in compute_regs() 47 regs->ptepin_at = (uint32_t)l1_page; in compute_regs() 48 regs->ptepin_as = XTENSA_MMU_PTE_ENTRY_VADDR(regs->ptevaddr, regs->ptevaddr) in compute_regs() 61 regs->vecpin_at = vb_pte; in compute_regs() 62 regs->vecpin_as = XTENSA_MMU_PTE_ENTRY_VADDR(regs->ptevaddr, vecbase) in compute_regs() 87 * and is performance-sensitive. in xtensa_set_paging() [all …]
|
/Zephyr-latest/subsys/mgmt/osdp/src/ |
D | osdp_sc.c | 4 * 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-latest/drivers/cache/ |
D | cache_aspeed.c | 4 * 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-latest/drivers/sensor/adi/adxl367/ |
D | adxl367.c | 4 * 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-latest/arch/arm64/core/ |
D | fpu.c | 5 * 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, arch_current_thread()->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-latest/tests/drivers/i2c/i2c_emul/src/ |
D | test_forwarding_pio.cpp | 3 * SPDX-License-Identifier: Apache-2.0 15 #define GET_TARGET_DEVICE(node_id, prop, n) DEVICE_DT_GET(DT_PHANDLE_BY_IDX(node_id, prop, n)), argument 35 // Expected N write requests to be made in ZTEST() 68 [expected_data](struct i2c_target_config *, uint8_t *out) -> int { in ZTEST() 73 [expected_data](struct i2c_target_config *, uint8_t *out) -> int { in ZTEST() 80 // Expect the read functions to be called N times in ZTEST() 110 target_write_requested_0_fake.return_val = -EINVAL; in ZTEST() 111 zassert_equal(-EINVAL, i2c_write(controller, write_data, sizeof(write_data), in ZTEST() 133 target_read_requested_0_fake.return_val = -EINVAL; in ZTEST() 134 zassert_equal(-EINVAL, i2c_read(controller, read_data, sizeof(read_data), in ZTEST() [all …]
|
/Zephyr-latest/tests/subsys/logging/log_syst/src/ |
D | mock_backend.c | 4 * 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-latest/arch/riscv/core/ |
D | fpu.c | 5 * 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' + arch_current_thread()->arch.exception_depth; in DBG() 40 strcat(buf, arch_current_thread()->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-latest/drivers/mipi_dbi/ |
D | mipi_dbi_spi.c | 5 * SPDX-License-Identifier: Apache-2.0 35 /* Expands to 1 if the node does not have the `write-only` property */ 36 #define _WRITE_ONLY_ABSENT(n) (!DT_INST_PROP(n, write_only)) | argument 38 /* This macro will evaluate to 1 if any of the nodes with zephyr,mipi-dbi-spi 39 * lack a `write-only` property. The intention here is to allow the entire 45 /* Expands to 1 if the node does reflect the enum in `xfr-min-bits` property */ 46 #define _XFR_8BITS(n) (DT_INST_PROP(n, xfr_min_bits) == MIPI_DBI_SPI_XFR_8BIT) | argument 47 #define _XFR_16BITS(n) (DT_INST_PROP(n, xfr_min_bits) == MIPI_DBI_SPI_XFR_16BIT) | argument 49 /* This macros will evaluate to 1 if any of the nodes with zephyr,mipi-dbi-spi 50 * have the `xfr-min-bits` property to corresponding enum value. The intention [all …]
|
/Zephyr-latest/arch/arm/core/ |
D | gdbstub.c | 4 * 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-latest/tests/kernel/sched/preempt/src/ |
D | main.c | 4 * 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-latest/samples/modules/tflite-micro/hello_world/train/ |
D | train_hello_world_model.ipynb | 23 "# 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 …]
|