GPIO unit test declarations for NAVHAL. More...
#include "unity.h"#include <stdint.h>

Go to the source code of this file.
Macros | |
| #define | TEST_PIN GPIO_PC09 |
| GPIO pin used for all tests (PC9) | |
| #define | TEST_AF GPIO_AF07 |
| Alternate function number used for testing (AF7) | |
Functions | |
| void | test_hal_gpio_setmode (void) |
| Test GPIO mode configuration. | |
| void | test_hal_gpio_getmode (void) |
| Test GPIO mode reading. | |
| void | test_hal_gpio_digitalwrite_sets_pin_high (void) |
| Test digital write high. | |
| void | test_hal_gpio_digitalwrite_sets_pin_low (void) |
| Test digital write low. | |
| void | test_gpio_set_alternate_function (void) |
| Test alternate function configuration. | |
GPIO unit test declarations for NAVHAL.
This header defines the test cases for verifying GPIO functionality in the NAVHAL hardware abstraction layer. It includes tests for:
| #define TEST_AF GPIO_AF07 |
Alternate function number used for testing (AF7)
| #define TEST_PIN GPIO_PC09 |
GPIO pin used for all tests (PC9)
| void test_gpio_set_alternate_function | ( | void | ) |
Test alternate function configuration.
Verifies hal_gpio_set_alternate_function() correctly:
Verifies that hal_gpio_set_alternate_function():
Test sequence:
| void test_hal_gpio_digitalwrite_sets_pin_high | ( | void | ) |
Test digital write high.
Verifies hal_gpio_digitalwrite() correctly:
Test digital write high.
Verifies that hal_gpio_digitalwrite() with GPIO_HIGH:
Test sequence:
| void test_hal_gpio_digitalwrite_sets_pin_low | ( | void | ) |
Test digital write low.
Verifies hal_gpio_digitalwrite() correctly:
Test digital write low.
Verifies that hal_gpio_digitalwrite() with GPIO_LOW:
Test sequence:
| void test_hal_gpio_getmode | ( | void | ) |
Test GPIO mode reading.
Verifies hal_gpio_getmode() correctly returns:
Verifies that hal_gpio_getmode() correctly returns:
Test sequence:
| void test_hal_gpio_setmode | ( | void | ) |
Test GPIO mode configuration.
Verifies hal_gpio_setmode() correctly configures:
Verifies that hal_gpio_setmode() correctly configures:
Test sequence: