Home
last modified time | relevance | path

Searched +full:0 +full:- +full:42 (Results 1 – 25 of 364) sorted by relevance

12345678910>>...15

/Zephyr-latest/tests/kernel/common/src/
Dprintk.c4 * SPDX-License-Identifier: Apache-2.0
8 #include <zephyr/sys/printk-hooks.h>
59 "p 112 -10000 -32768 -40000 -22\n"
61 "0x1 0x1 0x1 0x1 0x1\n"
62 "0x1 0x1 0x1 0x1\n"
63 "42 42 42 42\n"
64 "-42 -42 -42 -42\n"
65 "42 42 42 42\n"
66 "42 42 42 42\n"
67 "25542abcdef 42\n"
[all …]
/Zephyr-latest/tests/lib/c_lib/common/src/
Dtest_qsort.c4 * SPDX-License-Identifier: Apache-2.0
17 return (aa > bb) - (aa < bb); in compare_ints()
31 qsort(actual_int + 1, 0, sizeof(int), compare_ints); in ZTEST()
33 "out-of-bounds modifications detected"); in ZTEST()
37 int actual_int[] = { 42 }; in ZTEST()
38 const int expect_int[] = { 42 }; in ZTEST()
46 int actual_int[] = { 42, -42 }; in ZTEST()
47 const int expect_int[] = { -42, 42 }; in ZTEST()
55 int actual_int[] = { 42, -42, 0 }; in ZTEST()
56 const int expect_int[] = { -42, 0, 42 }; in ZTEST()
[all …]
/Zephyr-latest/samples/subsys/modbus/tcp_server/
DREADME.rst1 .. zephyr:code-sample:: modbus-tcp-server
3 :relevant-api: modbus bsd_sockets
16 This sample has been tested with FRDM-K64F board,
34 .. zephyr-app-commands::
35 :zephyr-app: samples/subsys/modbus/tcp_server
43 .. code-block:: console
45 # pymodbus.console tcp --host 192.0.2.1 --port 502
50 .. code-block:: console
53 > client.write_coil address=0 value=1 slave=1
57 .. code-block:: console
[all …]
/Zephyr-latest/samples/subsys/modbus/tcp_gateway/
DREADME.rst1 .. zephyr:code-sample:: modbus-gateway
2 :name: Modbus TCP-to-serial gateway
3 :relevant-api: modbus bsd_sockets
5 Implement a gateway between an Ethernet TCP-IP network and a Modbus serial line.
11 an Ethernet TCP-IP network and a Modbus serial line.
16 This sample has been tested with FRDM-K64F board,
21 :zephyr:code-sample:`modbus-rtu-server` sample. Client is running on a PC or laptop.
26 In addition to the evaluation boards RS-485 shields may be used.
27 The A+, B- lines of the RS-485 shields should be connected together.
38 .. zephyr-app-commands::
[all …]
/Zephyr-latest/tests/subsys/llext/src/
Dobject_ext.c4 * SPDX-License-Identifier: Apache-2.0
16 /* Test non-static global object relocation */
17 int number = 42;
28 case 42: in test_entry()
29 /* user-mode run: reinit number */ in test_entry()
30 number = 42; in test_entry()
39 zassert_equal(number, 42); in test_entry()
40 number = 0; in test_entry()
42 zassert_equal(number, 0); in test_entry()
/Zephyr-latest/tests/unit/pot/
Dlog2.cpp4 * SPDX-License-Identifier: Apache-2.0
10 static constexpr uint8_t val = LOG2(42);
11 static constexpr uint8_t val64 = LOG2(42 + BIT64(32));
20 zassert_equal(-1, LOG2(0)); in ZTEST()
21 zassert_equal(0, LOG2(1)); in ZTEST()
30 zassert_equal(62, LOG2(BIT64(63) - 1)); in ZTEST()
36 zassert_equal(5, log2(42)); in ZTEST()
38 zassert_equal(32, log2(42 + BIT64(32))); in ZTEST()
Dnhpot.cpp4 * SPDX-License-Identifier: Apache-2.0
10 static constexpr uint32_t val = NHPOT(42);
11 static constexpr uint64_t val64 = NHPOT(42 + BIT64(32));
23 zassert_equal(1, NHPOT(-1)); in ZTEST()
24 zassert_equal(1, NHPOT(0)); in ZTEST()
34 zassert_equal(0, (uint32_t)NHPOT(BIT64(32))); in ZTEST()
36 zassert_equal(BIT64(63), NHPOT(BIT64(63) - 1)); in ZTEST()
38 zassert_equal(0, NHPOT(BIT64(63) + 1)); in ZTEST()
39 zassert_equal(0, NHPOT(UINT64_MAX)); in ZTEST()
42 zassert_equal(64ULL, nhpot(42ULL)); in ZTEST()
[all …]
Dlog2ceil.c4 * SPDX-License-Identifier: Apache-2.0
10 static const uint8_t val = LOG2CEIL(42);
11 static const uint8_t val64 = LOG2CEIL(42 + BIT64(32));
15 zassert_equal(0, LOG2CEIL(LLONG_MIN)); in ZTEST()
16 zassert_equal(0, LOG2CEIL(LONG_MIN)); in ZTEST()
17 zassert_equal(0, LOG2CEIL(INT_MIN)); in ZTEST()
18 zassert_equal(0, LOG2CEIL(-1)); in ZTEST()
19 zassert_equal(0, LOG2CEIL(0)); in ZTEST()
20 zassert_equal(0, LOG2CEIL(1)); in ZTEST()
30 zassert_equal(63, LOG2CEIL(BIT64(63) - 1)); in ZTEST()
Dlog2ceil.cpp4 * SPDX-License-Identifier: Apache-2.0
11 static constexpr uint8_t val64 = LOG2CEIL(42 + BIT64(32));
20 zassert_equal(0, LOG2CEIL(LLONG_MIN)); in ZTEST()
21 zassert_equal(0, LOG2CEIL(LONG_MIN)); in ZTEST()
22 zassert_equal(0, LOG2CEIL(INT_MIN)); in ZTEST()
23 zassert_equal(0, LOG2CEIL(-1)); in ZTEST()
24 zassert_equal(0, LOG2CEIL(0)); in ZTEST()
25 zassert_equal(0, LOG2CEIL(1)); in ZTEST()
35 zassert_equal(63, LOG2CEIL(BIT64(63) - 1)); in ZTEST()
43 zassert_equal(33, log2ceil(42 + BIT64(32))); in ZTEST()
Dlog2.c4 * SPDX-License-Identifier: Apache-2.0
10 static const uint8_t val = LOG2(42);
11 static const uint8_t val64 = LOG2(42 + BIT64(32));
15 zassert_equal(-1, LOG2(LLONG_MIN)); in ZTEST()
16 zassert_equal(-1, LOG2(LONG_MIN)); in ZTEST()
17 zassert_equal(-1, LOG2(INT_MIN)); in ZTEST()
18 zassert_equal(-1, LOG2(-1)); in ZTEST()
19 zassert_equal(-1, LOG2(0)); in ZTEST()
20 zassert_equal(0, LOG2(1)); in ZTEST()
29 zassert_equal(62, LOG2(BIT64(63) - 1)); in ZTEST()
Dnhpot.c4 * SPDX-License-Identifier: Apache-2.0
12 static const uint32_t val = NHPOT(42);
13 static const uint64_t val64 = NHPOT(42 + BIT64(32));
20 zassert_equal(1, NHPOT(-1)); in ZTEST()
21 zassert_equal(1, NHPOT(0)); in ZTEST()
31 zassert_equal(0, (uint32_t)NHPOT(BIT64(32))); in ZTEST()
33 zassert_equal(BIT64(63), NHPOT(BIT64(63) - 1)); in ZTEST()
35 zassert_equal(0, NHPOT(BIT64(63) + 1)); in ZTEST()
36 zassert_equal(0, NHPOT(UINT64_MAX)); in ZTEST()
/Zephyr-latest/tests/subsys/settings/src/
Dsettings_test_getset_int.c5 * SPDX-License-Identifier: Apache-2.0
17 small_value = 42U; in ZTEST()
20 zassert_true(rc == 0, "can not set key value"); in ZTEST()
22 zassert_true(val8 == 42, in ZTEST()
30 zassert_equal(42, tmp[0], "unexpected value fetched"); in ZTEST()
/Zephyr-latest/samples/subsys/modbus/rtu_server/
DREADME.rst1 .. zephyr:code-sample:: modbus-rtu-server
3 :relevant-api: modbus
16 This sample has been tested with the nRF52840-DK and FRDM-K64F boards,
26 Using RS-485 transceiver
30 In addition to the evaluation board, an USB to RS-485 bus adapter and
31 a RS-485 shield are required. The shield converts UART TX, RX signals to RS-485.
32 An Arduino header compatible shield like `joy-it RS-485 shield for Arduino`_
34 on the JOY-IT shield. For other shields, ``de-gpios`` property must be adapted
38 The USB to RS-485 adapter connects to the USB port of a computer.
39 The two A+, B- lines should be connected to the RS-485 shield.
[all …]
/Zephyr-latest/tests/arch/arm/arm_custom_interrupt/
DREADME.txt2 the Cortex-M architectures.
7 Cortex-M architectures using the CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER
11 ---------------------------------------------------------------------------
14 *** Booting Zephyr OS build zephyr-v3.4.0-4023-g7fca0aa8a693 ***
17 START - test_arm_interrupt
18 Available IRQ line: 42
19 Got IRQ: 42
20 Got IRQ: 42
21 Got IRQ: 42
22 PASS - test_arm_interrupt in 0.001 seconds
[all …]
/Zephyr-latest/tests/application_development/gen_inc_file/
DCMakeLists.txt1 # SPDX-License-Identifier: Apache-2.0
3 cmake_minimum_required(VERSION 3.20.0)
17 --offset=100 --length=42)
18 generate_inc_file_for_target(app ${source_file} ${gen_dir}/file.bin.gz.inc --gzip)
20 --gzip --gzip-mtime=42)
22 --gzip --offset=100 --length=42)
/Zephyr-latest/include/zephyr/drivers/ieee802154/
Dcc1200.h4 * SPDX-License-Identifier: Apache-2.0
14 * First 42 entries are for the 42 first registers from
15 * address 0x04 to 0x2D included.
17 * extended address 0x00 to 0x39 included
/Zephyr-latest/tests/unit/math_extras/
Dtests.inc4 * SPDX-License-Identifier: Apache-2.0
13 uint32_t result = 42;
18 zassert_false(u32_add_overflow(2, 0, &result));
21 zassert_false(u32_add_overflow(0, 3, &result));
24 zassert_false(u32_add_overflow(0, UINT32_MAX, &result));
27 zassert_equal(result, 0);
29 zassert_false(u32_add_overflow(UINT32_MAX, 0, &result));
37 uint32_t result = 42;
55 uint64_t result = 42;
60 zassert_false(u64_add_overflow(2, 0, &result));
[all …]
/Zephyr-latest/tests/subsys/settings/fcb/src/
Dsettings_test_save_2_fcb.c5 * SPDX-License-Identifier: Apache-2.0
24 /* this case need c_test_handler[0] to handle access to val8 */ in ZTEST()
25 rc = settings_register(&c_test_handlers[0]); in ZTEST()
26 zassert_true(rc == 0 || rc == -EEXIST, "settings_register fail"); in ZTEST()
28 zassert_true(rc == 0 || rc == -EEXIST, "settings_register fail"); in ZTEST()
37 zassert_true(rc == 0, "can't register FCB as configuration source"); in ZTEST()
41 zassert_true(rc == 0, in ZTEST()
44 test_config_fill_area(test_ref_value, 0); in ZTEST()
49 val8 = 42U; in ZTEST()
51 zassert_true(rc == 0, "fcb write error"); in ZTEST()
[all …]
Dsettings_test_save_one_fcb.c5 * SPDX-License-Identifier: Apache-2.0
21 rc = settings_register(&c_test_handlers[0]); in ZTEST()
22 zassert_true(rc == 0 || rc == -EEXIST, "settings_register fail"); in ZTEST()
31 zassert_true(rc == 0, "can't register FCB as configuration source"); in ZTEST()
35 zassert_true(rc == 0, in ZTEST()
40 zassert_true(rc == 0, "fcb write error"); in ZTEST()
42 rc = test_config_save_one_byte_value("myfoo/mybar", 42); in ZTEST()
43 zassert_true(rc == 0, "fcb one item write error"); in ZTEST()
46 zassert_true(rc == 0, "fcb read error"); in ZTEST()
47 zassert_true(val8 == 42U, "bad value read"); in ZTEST()
[all …]
/Zephyr-latest/include/zephyr/arch/arm/
Dgdbstub.h4 * SPDX-License-Identifier: Apache-2.0
14 #define DBGDSCR_MONITOR_MODE_EN 0x8000
16 #define SPSR_ISETSTATE_ARM 0x0
17 #define SPSR_ISETSTATE_JAZELLE 0x2
22 #define DBGDBCR_MEANING_MASK 0x7
24 #define DBGDBCR_MEANING_ADDR_MISMATCH 0x4
25 #define DBGDBCR_BYTE_ADDR_MASK 0xF
27 #define DBGDBCR_BRK_EN_MASK 0x1
31 /* Minimal size of the packet - SPSR is the last, 42-nd byte, see packet_pos array */
32 #define GDB_READALL_PACKET_SIZE (42 * 8)
[all …]
/Zephyr-latest/tests/subsys/settings/file/src/
Dsettings_test_save_one_file.c5 * SPDX-License-Identifier: Apache-2.0
24 zassert_true(rc == 0 || rc == -EEXIST, "can't create directory"); in ZTEST()
28 cf.cf_lines = 0; /* normally fetched while loading, but this is test */ in ZTEST()
30 zassert_true(rc == 0, "can't register FS as configuration source"); in ZTEST()
33 zassert_true(rc == 0, in ZTEST()
38 zassert_true(rc == 0, "fs write error"); in ZTEST()
40 rc = test_config_save_one_byte_value("myfoo/mybar", 42); in ZTEST()
41 zassert_equal(rc, 0, "fs one item write error"); in ZTEST()
44 zassert_true(rc == 0, "fs redout error"); in ZTEST()
45 zassert_true(val8 == 42U, "bad value read"); in ZTEST()
[all …]
/Zephyr-latest/tests/lib/hash_map/src/
Dremove.c4 * SPDX-License-Identifier: Apache-2.0
16 for (size_t i = 0; i < MANY; ++i) { in ZTEST()
22 for (size_t i = MANY; i > 0; --i) { in ZTEST()
23 zassert_equal(true, sys_hashmap_remove(&map, i - 1, NULL)); in ZTEST()
24 zassert_equal(i - 1, sys_hashmap_size(&map)); in ZTEST()
28 zassert_equal(map.data->buckets, NULL); in ZTEST()
29 zassert_equal(map.data->n_buckets, 0); in ZTEST()
35 zassert_false(sys_hashmap_remove(&map, 42, NULL)); in ZTEST()
38 zassert_false(sys_hashmap_remove(&map, 42, NULL)); in ZTEST()
/Zephyr-latest/samples/userspace/prod_consumer/src/
Dapp_syscall.c4 * SPDX-License-Identifier: Apache-2.0
16 * 42. This is just for demonstration purposes to show how syscalls can be
23 if (*cookie > 42) { in z_impl_magic_syscall()
25 return -EINVAL; in z_impl_magic_syscall()
30 return 0; in z_impl_magic_syscall()
38 /* Confirm that this user-supplied pointer is valid memory that in z_vrfy_magic_syscall()
41 if (k_usermode_from_copy(&cookie_copy, cookie, sizeof(*cookie)) != 0) { in z_vrfy_magic_syscall()
42 return -EPERM; in z_vrfy_magic_syscall()
49 if (ret == 0 && in z_vrfy_magic_syscall()
50 k_usermode_to_copy(cookie, &cookie_copy, sizeof(*cookie)) != 0) { in z_vrfy_magic_syscall()
[all …]
/Zephyr-latest/samples/modules/tflite-micro/magic_wand/renode/
Dcircle.data1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
9 0 0 0
10 0 0 0
[all …]
/Zephyr-latest/tests/kernel/mem_protect/mem_map/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
17 /* 32-bit IA32 page tables have no mechanism to restrict execution */
25 /* k_mem_map_phys_bare() doesn't have alignment requirements, any oddly-sized buffer
39 printk("Caught system error -- reason %d\n", reason);
41 if (expect_fault && reason == 0) {
81 /* Initialize read-write buf with some bytes */ in ZTEST()
82 for (int i = 0; i < BUF_SIZE; i++) { in ZTEST()
98 for (int i = 0; i < BUF_SIZE; i++) { in ZTEST()
110 /* Check that the read-only mapped area contains the expected data. */ in ZTEST()
111 for (int i = 0; i < BUF_SIZE; i++) { in ZTEST()
[all …]

12345678910>>...15