/Zephyr-latest/tests/drivers/gpio/gpio_ite_it8xxx2_v2/src/ |
D | main.c | 30 #define TEST_PIN 1 macro 31 #define TEST_IRQ DT_IRQ_BY_IDX(MY_GPIO, TEST_PIN, irq) 32 #define TEST_MASK DT_PROP_BY_IDX(MY_GPIO, wuc_mask, TEST_PIN) 52 case DT_PROP_BY_IDX(MY_GPIO, wuc_base, TEST_PIN): in fake_ecreg() 54 case DT_PROP_BY_IDX(MY_GPIO, wuc_base, TEST_PIN) + 1: in fake_ecreg() 56 case DT_PROP_BY_IDX(MY_GPIO, wuc_base, TEST_PIN) + 3: in fake_ecreg() 73 zexpect_equal(pins, BIT(TEST_PIN)); in callback() 100 zassert_ok(gpio_pin_configure(gpio_dev, TEST_PIN, GPIO_INPUT | GPIO_ACTIVE_HIGH)); in ZTEST() 103 zexpect_equal(registers.gpcr[TEST_PIN], GPCR_PORT_PIN_MODE_INPUT, "gpcr[%d]=%x", TEST_PIN, in ZTEST() 104 registers.gpcr[TEST_PIN]); in ZTEST() [all …]
|
/Zephyr-latest/tests/drivers/gpio/gpio_api_1pin/src/ |
D | test_config.c | 56 TC_PRINT("Running test on port=%s, pin=%d\n", port->name, TEST_PIN); in ZTEST() 58 ret = gpio_pin_configure(port, TEST_PIN, GPIO_OUTPUT); in ZTEST() 61 pin_set_raw_and_verify(port, TEST_PIN, 1, TEST_POINT(1)); in ZTEST() 62 pin_set_raw_and_verify(port, TEST_PIN, 0, TEST_POINT(1)); in ZTEST() 67 ret = gpio_pin_configure(port, TEST_PIN, GPIO_OUTPUT | GPIO_INPUT); in ZTEST() 75 pin_set_raw_and_verify(port, TEST_PIN, 0, TEST_POINT(2)); in ZTEST() 76 pin_get_raw_and_verify(port, TEST_PIN, 0, TEST_POINT(2)); in ZTEST() 78 pin_set_raw_and_verify(port, TEST_PIN, 1, TEST_POINT(3)); in ZTEST() 79 pin_get_raw_and_verify(port, TEST_PIN, 1, TEST_POINT(3)); in ZTEST() 81 pin_set_raw_and_verify(port, TEST_PIN, 0, TEST_POINT(4)); in ZTEST() [all …]
|
D | test_pin.c | 69 TC_PRINT("Running test on port=%s, pin=%d\n", port->name, TEST_PIN); in ZTEST() 71 ret = gpio_pin_configure(port, TEST_PIN, GPIO_OUTPUT | GPIO_INPUT); in ZTEST() 79 pin_set_raw_and_verify(port, TEST_PIN, 1, 0); in ZTEST() 82 ret = gpio_pin_toggle(port, TEST_PIN); in ZTEST() 88 pin_get_raw_and_verify(port, TEST_PIN, val_expected, i); in ZTEST() 111 TC_PRINT("Running test on port=%s, pin=%d\n", port->name, TEST_PIN); in ZTEST() 113 ret = gpio_pin_configure(port, TEST_PIN, GPIO_OUTPUT | in ZTEST() 117 pin_set_and_verify(port, TEST_PIN, 1, 0); in ZTEST() 123 ret = gpio_pin_toggle(port, TEST_PIN); in ZTEST() 150 TC_PRINT("Running test on port=%s, pin=%d\n", port->name, TEST_PIN); in ZTEST() [all …]
|
D | test_port.c | 120 TC_PRINT("Running test on port=%s, pin=%d\n", port->name, TEST_PIN); in ZTEST() 122 ret = gpio_pin_configure(port, TEST_PIN, GPIO_OUTPUT | GPIO_INPUT); in ZTEST() 130 port_set_bits_raw_and_verify(port, BIT(TEST_PIN), 0); in ZTEST() 132 val_expected = BIT(TEST_PIN); in ZTEST() 135 ret = gpio_port_toggle_bits(port, BIT(TEST_PIN)); in ZTEST() 139 val_expected ^= BIT(TEST_PIN); in ZTEST() 141 port_get_raw_and_verify(port, BIT(TEST_PIN), val_expected, i); in ZTEST() 169 TC_PRINT("Running test on port=%s, pin=%d\n", port->name, TEST_PIN); in ZTEST() 171 ret = gpio_pin_configure(port, TEST_PIN, GPIO_OUTPUT | GPIO_INPUT); in ZTEST() 180 port_set_masked_raw_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in ZTEST() [all …]
|
D | test_pin_interrupt.c | 19 zassert_equal(pins, BIT(TEST_PIN), in callback_edge() 30 zassert_equal(pins, BIT(TEST_PIN), in callback_level() 35 ret = gpio_pin_interrupt_configure(port, TEST_PIN, GPIO_INT_DISABLE); in callback_level() 61 TC_PRINT("Running test on port=%s, pin=%d\n", port->name, TEST_PIN); in test_gpio_pin_interrupt_edge() 63 ret = gpio_pin_configure(port, TEST_PIN, GPIO_INPUT | GPIO_OUTPUT); in test_gpio_pin_interrupt_edge() 76 ret = gpio_pin_configure(port, TEST_PIN, GPIO_INPUT | cfg_out_flag | in test_gpio_pin_interrupt_edge() 83 gpio_init_callback(&gpio_cb, callback_edge, BIT(TEST_PIN)); in test_gpio_pin_interrupt_edge() 86 ret = gpio_pin_interrupt_configure(port, TEST_PIN, int_flags); in test_gpio_pin_interrupt_edge() 95 pin_set_and_verify(port, TEST_PIN, 1, i); in test_gpio_pin_interrupt_edge() 103 pin_set_and_verify(port, TEST_PIN, 0, i); in test_gpio_pin_interrupt_edge() [all …]
|
D | test_gpio_api.h | 20 #define TEST_PIN DT_GPIO_PIN(DT_INST(0, test_gpio_external_pulldown), gpios) macro 24 #define TEST_PIN DT_GPIO_PIN(DT_ALIAS(led0), gpios) macro
|
/Zephyr-latest/tests/drivers/gpio/gpio_nrf/src/ |
D | main.c | 14 #define TEST_PIN DT_GPIO_PIN(DT_ALIAS(led0), gpios) macro 30 err = gpio_pin_configure(port, TEST_PIN, GPIO_PUSH_PULL | NRF_GPIO_DRIVE_S0H1); in ZTEST() 36 err = gpio_pin_configure(port, TEST_PIN, GPIO_PUSH_PULL | NRF_GPIO_DRIVE_H0S1); in ZTEST() 42 err = gpio_pin_configure(port, TEST_PIN, GPIO_PUSH_PULL | NRF_GPIO_DRIVE_H0H1); in ZTEST() 48 err = gpio_pin_configure(port, TEST_PIN, GPIO_OPEN_DRAIN | NRF_GPIO_DRIVE_H0S1); in ZTEST() 54 err = gpio_pin_configure(port, TEST_PIN, GPIO_OPEN_SOURCE | NRF_GPIO_DRIVE_S0H1); in ZTEST() 73 response = gpio_pin_configure(port, TEST_PIN, GPIO_OUTPUT | GPIO_ACTIVE_HIGH); in ZTEST() 76 response = gpio_pin_set(port, TEST_PIN, 0); in ZTEST() 79 response = gpio_pin_set(port, TEST_PIN, 1); in ZTEST() 82 response = gpio_pin_toggle(port, TEST_PIN); in ZTEST() [all …]
|
/Zephyr-latest/tests/drivers/gpio/gpio_get_direction/src/ |
D | main.c | 12 #define TEST_PIN DT_GPIO_PIN(DT_ALIAS(led0), gpios) macro 25 fixture.pin = TEST_PIN; in gpio_get_direction_setup()
|