/Zephyr-latest/scripts/west_commands/zspdx/ |
D | writer.py | 3 # SPDX-License-Identifier: Apache-2.0 14 r'^cpe:2\.3:[aho\*\-](:(((\?*|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&\'\(\)\+,\/:;<=>@\[\]\^' 15 … r"`\{\|}~]))+(\?*|\*?))|[\*\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\*\-]))(:(((\?*" 16 …r'|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&\'\(\)\+,\/:;<=>@\[\]\^`\{\|}~]))+(\?*|\*?))|[\*\-])){4}… 21 # Replace "_" by "-" since it's not allowed in spdx ID 22 return name.replace("_", "-") 24 # Output tag-value SPDX 2.3 content for the given Relationship object. 26 # 1) f: file handle for SPDX document 28 def writeRelationshipSPDX(f, rln): argument 29 …f.write(f"Relationship: {_normalize_spdx_name(rln.refA)} {rln.rlnType} {_normalize_spdx_name(rln.r… [all …]
|
D | scanner.py | 3 # SPDX-License-Identifier: Apache-2.0 21 # when assembling a Package's data, should we auto-conclude the 25 # when assembling a Package's Files' data, should we auto-conclude 29 # number of lines to scan for SPDX-License-Identifier (0 = all) 43 p = line.partition("SPDX-License-Identifier:") 55 Scans the specified file for the first SPDX-License-Identifier: 59 - filePath: path to file to scan. 60 - numLines: number of lines to scan for an expression before 64 log.dbg(f" - getting licenses for {filePath}") 66 with open(filePath, "r") as f: [all …]
|
/Zephyr-latest/include/zephyr/sys/ |
D | util_listify.h | 5 * SPDX-License-Identifier: Apache-2.0 15 #define Z_UTIL_LISTIFY_0(F, sep, ...) argument 17 #define Z_UTIL_LISTIFY_1(F, sep, ...) \ argument 18 F(0, __VA_ARGS__) 20 #define Z_UTIL_LISTIFY_2(F, sep, ...) \ argument 21 Z_UTIL_LISTIFY_1(F, sep, __VA_ARGS__) __DEBRACKET sep \ 22 F(1, __VA_ARGS__) 24 #define Z_UTIL_LISTIFY_3(F, sep, ...) \ argument 25 Z_UTIL_LISTIFY_2(F, sep, __VA_ARGS__) __DEBRACKET sep \ 26 F(2, __VA_ARGS__) [all …]
|
/Zephyr-latest/tests/kernel/timer/timer_behavior/pytest/ |
D | test_timer.py | 1 # Copyright (c) 2023-2024 Intel Corporation 3 # SPDX-License-Identifier: Apache-2.0 16 logger.info(f'periodic timer behaviour using {test} mechanism:') 29 expected_period_drift = ((periods_tick * cyc_per_tick - expected_period) / 35 min_bound = (test_period - period_max_drift * test_period + 46 time_diff = stats['total_time'] - seconds - expected_total_drift 48 logger.info(f'min: {stats["min"] * 1_000_000:.6f} us') 49 logger.info(f'max: {stats["max"] * 1_000_000:.6f} us') 50 logger.info(f'mean: {stats["mean"] * 1_000_000:.6f} us') 51 logger.info(f'variance: {stats["var"] * 1_000_000:.6f} us') [all …]
|
/Zephyr-latest/scripts/dts/ |
D | gen_defines.py | 3 # Copyright (c) 2019 - 2020 Nordic Semiconductor ASA 6 # SPDX-License-Identifier: BSD-3-Clause 11 # Note: Do not access private (_-prefixed) identifiers from edtlib here (and 25 sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'python-devicetree', 40 with open(args.edt_pickle, 'rb') as f: 41 edt = pickle.load(f) 46 with open(args.header_out, "w", encoding="utf-8") as header_file: 58 # Check to see if we have duplicate "zephyr,memory-region" property values. 61 if 'zephyr,memory-region' in node.props: 62 region = node.props['zephyr,memory-region'].val [all …]
|
/Zephyr-latest/samples/net/cloud/aws_iot_mqtt/src/creds/ |
D | convert_keys.py | 2 # SPDX-License-Identifier: Apache-2.0 9 with open(fin, 'rb') as f: 10 data = f.read() 14 with open(fout, 'w') as f: 15 f.write("#include <stdint.h>\n") 16 f.write(f"const uint8_t {name}[] = {{") 18 f.write("\n\t") 19 f.write(", ".join(f"0x{b:02x}" for b in data[i:i+16])) 20 f.write(",") 21 f.write("\n};\n") [all …]
|
/Zephyr-latest/scripts/coccinelle/ |
D | find_dev_usage.cocci | 2 // SPDX-License-Identifier: Apache-2.0 23 def check_and_report(F, f, D, nb_args, p): 24 if f in f_void and int(nb_args) in f_void[f]: 26 loosing const qualifier, please wrap".format(F, f, D) 28 elif f not in f_void and f not in f_other and not f.isupper(): 30 check if const qualifier is not lost".format(F, f, D) 34 with open("function_names.pickle", "rb") as f: 35 data = pickle.load(f) 50 identifier f; 53 f(args, D@p, ...) [all …]
|
D | find_functions.cocci | 2 // SPDX-License-Identifier: Apache-2.0 33 def insert_function(f, params): 41 f_void[f] = void_pos 43 f_other[f] = i + 1 56 -struct device * 64 identifier f; 68 ret_type f(params); 74 f << r_find_func_declare.f; 77 insert_function(f, params) 86 identifier f; [all …]
|
/Zephyr-latest/dts/bindings/clock/ |
D | st,stm32h7rs-pll-clock.yaml | 2 # SPDX-License-Identifier: Apache-2.0 16 f(PLL_Px) = f(VCOx clock) / PLLPx -> pllx_p_ck ((pll1_p_ck : sys_ck)) 17 f(PLL_Qx) = f(VCOx clock) / PLLQx -> pllx_q_ck 18 f(PLL_Rx) = f(VCOx clock) / PLLRx -> pllx_r_ck 19 f(PLL_Sx) = f(VCOx clock) / PLLSx -> pllx_s_ck 20 f(PLL_Tx) = f(VCOx clock) / PLLTx -> pllx_t_ck (only for PLL2) 22 with f(VCOx clock) = f(REFx_CK) × (PLLNx / PLLMx) 25 compatible: "st,stm32h7rs-pll-clock" 27 include: st,stm32h7-pll-clock.yaml 30 div-s: [all …]
|
D | st,stm32f0-pll-clock.yaml | 2 # SPDX-License-Identifier: Apache-2.0 14 f(PLLCLK) = f(PLLIN) x PLLMUL --> SYSCLK (System Clock) 18 f(PLLIN) = f(input_clk) / PREDIV 21 f(PLLIN) = f(input_clk) / 2 23 f(PLLIN) = f(input_clk) / PREDIV 25 The PLL output frequency must be set in range 16-48MHz 27 compatible: "st,stm32f0-pll-clock" 30 - name: st,stm32f105-pll-clock.yaml 31 property-blocklist: 32 - mul [all …]
|
/Zephyr-latest/arch/xtensa/core/ |
D | gen_zsr.py | 3 # SPDX-License-Identifier: Apache-2.0 10 # same on every device. This script parses a pre-cooked ("gcc -E 11 # -dM") core-isa.h file for the current architecture and assigns 17 parser.add_argument("--coherence", action="store_true", 19 parser.add_argument("--mmu", action="store_true", 21 parser.add_argument("--syscall-scratch", action="store_true", 24 help="Path to preprocessed core-isa.h") 53 regs = [ f"MISC{n}" for n in range(0, int(get("XCHAL_NUM_MISC_REGS"))) ] 63 # Next come EXCSAVE. Also record our highest non-debug interrupt level. 66 regs.append(f"EXCSAVE{il}") [all …]
|
/Zephyr-latest/samples/drivers/lora/receive/ |
D | README.rst | 1 .. zephyr:code-sample:: lora-receive 3 :relevant-api: lora_api 15 LoRa send sample :zephyr:code-sample:`lora-send` on another board within range. 27 .. zephyr-app-commands:: 28 :zephyr-app: samples/drivers/lora/receive 29 :host-os: unix 37 .. code-block:: console 40 [00:00:00.956,000] <inf> lora_receive: LoRa RX RSSI: -60dBm, SNR: 7dB 42 … 68 65 6c 6c 6f 77 6f 72 6c 64 |hellowor ld 43 [00:00:02.249,000] <inf> lora_receive: LoRa RX RSSI: -57dBm, SNR: 9dB [all …]
|
/Zephyr-latest/tests/subsys/dsp/utils/src/ |
D | f32.c | 4 * SPDX-License-Identifier: Apache-2.0 23 #define TEST_CASES_SHIFT_F32_TO_Q7 (-1.0F, 0, -128), (1.0F, 0, 127), (1.0F, 7, 1), (-1.0F, 7, -1) 26 (-1.0F, 0, -32768), (1.0F, 0, 32767), (1.0F, 15, 1), (-1.0F, 15, -1) 29 (-1.0F, 0, -2147483648), (1.0F, 0, 2147483647), (1.0F, 31, 1), (-1.0F, 31, -1) 37 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f32_to_q7() 47 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f32_to_q15() 57 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f32_to_q31()
|
/Zephyr-latest/tests/subsys/debug/coredump_threads/ |
D | testcase.yaml | 2 # SPDX-License-Identifier: Apache-2.0 6 - coredump 10 - qemu_cortex_m3 20 - "E: #CD:BEGIN#" 21 - "E: #CD:5([aA])45([0-9a-fA-F]+)" 22 - "E: #CD:41([0-9a-fA-F]+)" 23 - "E: #CD:54([0-9a-fA-F]+)" 24 - "E: #CD:4([dD])([0-9a-fA-F]+)" 25 - "E: #CD:4([dD])([0-9a-fA-F]+)" 26 - "E: #CD:4([dD])([0-9a-fA-F]+)" [all …]
|
/Zephyr-latest/scripts/west_commands/tests/ |
D | test_nrf.py | 4 # SPDX-License-Identifier: Apache-2.0 27 TEST_DEF_SNR = 'test-default-serial-number' # for mocking user input 28 TEST_OVR_SNR = 'test-override-serial-number' 30 TEST_TOOL_OPT = '--ip 192.168.1.10' 66 # Use --reset instead of --pinreset if True 69 # --snr TEST_OVR_SNR if True, --snr TEST_DEF_SNR if False 72 # --chiperase if True, 73 # --sectorerase if False (or --sectoranduicrerase on nRF52) 76 # --tool-opt TEST_TOOL_OPT if True 82 # ------------------------------------------------------------------------- [all …]
|
/Zephyr-latest/scripts/utils/ |
D | board_v1_to_v2.py | 12 - ``-b|--board``: The name of the board to migrate. 13 - ``-g|--group``: The group the board belongs to. This is used to group a set of 16 - ``-v|--vendor``: The vendor name. 17 - ``-s|--soc``: The SoC name. 21 this is no longer needed. In such cases, ``-n|--new-board`` needs to be 24 For boards with variants, ``--variants`` needs to be provided. 26 For out-of-tree boards, provide ``--board-root`` pointing to the custom board 30 SPDX-License-Identifier: Apache-2.0 46 board_path = next(board_root.glob(f"boards/*/{board}")) 48 sys.exit(f"Board not found: {board}") [all …]
|
/Zephyr-latest/samples/subsys/zbus/dyn_channel/ |
D | sample.yaml | 10 - "W: size=01" 11 - "W: Content" 12 - "W: 00 |." 13 - "W: size=02" 14 - "W: Content" 15 - "W: 01 01 |.." 16 - "W: size=03" 17 - "W: Content" 18 - "W: 00 00 00 |..." 19 - "W: size=04" [all …]
|
D | README.rst | 1 .. zephyr:code-sample:: zbus-dyn-channel 3 :relevant-api: zbus_apis 17 .. zephyr-app-commands:: 18 :zephyr-app: samples/subsys/zbus/dyn_channel 19 :host-os: unix 26 .. code-block:: console 82 W: 0f 0f 0f 0f 0f 0f 0f 0f |........ 83 W: 0f 0f 0f 0f 0f 0f 0f 0f |........
|
/Zephyr-latest/soc/nuvoton/npcm/common/esiost/ |
D | esiost.py | 5 # SPDX-License-Identifier: Apache-2.0 10 # -i in_file.bin -o out_file.bin 11 # [-chip <name>] [-v] 61 INVALID_INPUT = -1 103 :returns: output file path object, or -1 if fails 110 exit_with_failure("Define input file, using -i flag") 115 exit_with_failure(f'Cannot open {input_file}') 117 exit_with_failure(f'BIN Input file ({input_file}) is empty') 128 exit_with_failure(f'Input file name {input_file} ' 129 f'should be differed from' [all …]
|
/Zephyr-latest/tests/drivers/coredump/coredump_api/ |
D | testcase.yaml | 2 # SPDX-License-Identifier: Apache-2.0 6 - coredump 18 - "E: #CD:BEGIN#" 19 - "E: #CD:5([aA])45([0-9a-fA-F]+)" 20 - "E: #CD:4([dD])([0-9a-fA-F]+)" 21 - "E: #CD:4([dD])([0-9a-fA-F]+)" 22 - "E: #CD:4([dD])([0-9a-fA-F]+)" 23 - "E: #CD:12121212" 24 - "E: #CD:4([dD])([0-9a-fA-F]+)" 25 - "E: #CD:34343434" [all …]
|
/Zephyr-latest/soc/nuvoton/npcx/common/ecst/ |
D | ecst.py | 5 # SPDX-License-Identifier: Apache-2.0 10 # -i in_file.bin -o out_file.bin 11 # [-chip <name>] [-v|-vv] 12 # [-nohcrc] [-nofcrc] [-ph <offset>] 13 # [-flashsize <1|2|4|8|16>] 14 # [-spimaxclk <20|25|33|40|50>] 15 # [-spireadmode <normal|fast|dual|quad>] 112 INVALID_INPUT = -1 115 BYTES_TO_PAD = HDR_FW_HEADER_SIG_OFFSET - RESERVED_BYTES_OFFSET 166 :returns: output file path object, or -1 if fails [all …]
|
/Zephyr-latest/arch/x86/zefi/ |
D | printf.h | 4 * SPDX-License-Identifier: Apache-2.0 10 /* Tiny, but not-as-primitive-as-it-looks implementation of something 14 * the regex: [0-9]*\.?[0-9]* 28 if (r->buf != NULL) { in pc() 29 if (r->idx <= r->len) { in pc() 30 r->buf[r->idx] = c; in pc() 35 r->idx++; in pc() 41 pc(r, '-'); in prdec() 42 v = -v; in prdec() 46 int i = sizeof(digs) - 1; in prdec() [all …]
|
/Zephyr-latest/tests/lib/c_lib/common/src/ |
D | test_sqrt.c | 4 * SPDX-License-Identifier: Apache-2.0 13 #define local_abs(x) (((x) < 0) ? -(x) : (x)) 24 1.0f, 2.0f, 3.0f, 4.0f, 25 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, /* numbers across the decade */ 26 3.14159265359f, 2.718281828f, /* irrational numbers pi and e */ 27 123.4f, 0.025f, 0.10f, 1.875f /* numbers with infinite */ 66 union { uint32_t u; float f; } ieee754; in isinff() member 67 ieee754.f = x; in isinff() 77 union { uint32_t u; float f; } ieee754; in isnanf() member 78 ieee754.f = x; in isnanf() [all …]
|
/Zephyr-latest/soc/nordic/ |
D | validate_rram_partitions.c | 4 * SPDX-License-Identifier: Apache-2.0 11 #define PAIR__(f, sep, arg_first, ...) FOR_EACH_FIXED_ARG(f, sep, arg_first, __VA_ARGS__) argument 12 #define PAIR_(f, sep, args_to_expand) PAIR__(f, sep, args_to_expand) argument 13 #define PAIR(n, f, sep, ...) PAIR_(f, sep, GET_ARGS_LESS_N(n, __VA_ARGS__)) argument 18 * For example, FOR_EACH_PAIR(f, (,), 1, 2, 3, 4) should expand to: 20 * f(2, 1) , f(3, 1) , f(4, 1) , f(3, 2) , f(4, 2) , f(4, 3) 22 * @param f Macro to call. Must accept two arguments. 27 #define FOR_EACH_PAIR(f, sep, ...) \ argument 28 LISTIFY(NUM_VA_ARGS_LESS_1(__VA_ARGS__), PAIR, sep, f, sep, __VA_ARGS__) 31 * @brief Get a node's non-secure register block start address. [all …]
|
/Zephyr-latest/subsys/tracing/ctf/ |
D | ctf_map.h | 30 * Implements the higher-order Map function in the C Pre-Processor. 35 * [1] https://github.com/swansontec/map-macro SHA:383c38e9 36 * [2] http://jhnet.co.uk/articles/cpp_magic#turning-recursion-into-an-iterator 37 * [3] https://en.wikipedia.org/wiki/Map_(higher-order_function) 61 #define MAP0(f, x, peek, ...) f(x) MAP_NEXT(peek, MAP1)(f, peek, __VA_ARGS__) argument 62 #define MAP1(f, x, peek, ...) f(x) MAP_NEXT(peek, MAP0)(f, peek, __VA_ARGS__) argument 67 #define MAP_LIST0(f, x, peek, ...) f(x) MAP_LIST_NEXT(peek, MAP_LIST1)(f, peek, __VA_ARGS__) argument 68 #define MAP_LIST1(f, x, peek, ...) f(x) MAP_LIST_NEXT(peek, MAP_LIST0)(f, peek, __VA_ARGS__) argument 71 * Applies the function macro `f` to each of the remaining parameters. 73 #define MAP(f, ...) EVAL(MAP1(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) argument [all …]
|