Unit tests for GPIO driver.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
static void | gpio_pin_callback (void) |
GPIO pin interrupt callback. More... | |
int | main (void) |
Run GPIO driver unit tests. More... | |
static void | run_gpio_int_test (const struct test_case *test) |
Test GPIO interrupt. More... | |
Variables | |
volatile bool | gpio_int_happened = false |
|
static |
int main | ( | void | ) |
Run GPIO driver unit tests.
References uart_rs232_options::baudrate, board_init(), CONF_TEST_BAUDRATE, CONF_TEST_CHARLENGTH, CONF_TEST_PARITY, CONF_TEST_STOPBITS, CONF_TEST_USART, DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, run_gpio_int_test(), stdio_serial_init(), sysclk_init(), and test_suite_run().
|
static |
Test GPIO interrupt.
test | Current test case. |
References CONF_TEST_GPIO_IN, CONF_TEST_GPIO_OUT, delay_ms, gpio_enable_pin_interrupt(), gpio_int_happened, gpio_pin_callback(), gpio_set_pin_callback(), IOPORT_DIR_INPUT, IOPORT_DIR_OUTPUT, IOPORT_MODE_GLITCH_FILTER, IOPORT_MODE_PULLUP, IOPORT_PIN_LEVEL_HIGH, IOPORT_PIN_LEVEL_LOW, IOPORT_SENSE_FALLING, ioport_set_pin_dir(), ioport_set_pin_level(), ioport_set_pin_mode(), ioport_set_pin_sense_mode(), and test_assert_true.
Referenced by main().
Referenced by gpio_pin_callback(), and run_gpio_int_test().