Unit tests for GPIO driver.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <conf_test.h>
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(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, NULL, run_gpio_int_test(), stdio_serial_init(), sysclk_init(), test_suite_run(), and usart_serial_options.
|
static |
Test GPIO interrupt.
test | Current test case. |
References 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().