1 #ifndef RUUVI_INTERFACE_GPIO_PWM_TEST_H
2 #define RUUVI_INTERFACE_GPIO_PWM_TEST_H
20 #define RI_GPIO_PWM_TEST_FREQ_HZ (100U)
21 #define RI_GPIO_PWM_TEST_FREQ_INVALID_MAX_HZ (17000000U)
22 #define RI_GPIO_PWM_TEST_FREQ_INVALID_MIN_HZ (1U)
23 #define RI_GPIO_PWM_TEST_DUTY_INVALID_MIN_HZ (-0.1F)
24 #define RI_GPIO_PWM_TEST_DUTY_INVALID_MAX_HZ (1.1F)
26 #define RI_GPIO_PWM_TEST_PERIOD_MS (1000U / RI_GPIO_PWM_TEST_FREQ_HZ)
27 #define RI_GPIO_PWM_TEST_DC (0.5F)
28 #define RI_GPIO_PWM_TEST_TIME_MS (100U)
29 #define RI_GPIO_PWM_EXPECT_TRIGS (RI_GPIO_PWM_TEST_TIME_MS / RI_GPIO_PWM_TEST_PERIOD_MS)
uint32_t rd_status_t
bitfield for representing errors
rd_status_t ri_gpio_interrupt_test_init(const rd_test_gpio_cfg_t cfg)
Test GPIO interrupt initialization.
rd_status_t ri_gpio_pwm_test(const rd_test_gpio_cfg_t cfg)
Test running PWM on a pin.
bool ri_gpio_pwm_run_integration_test(const rd_test_print_fp printfp, const ri_gpio_id_t input, const ri_gpio_id_t output)
Run all GPIO interrupt integration tests.
void(* rd_test_print_fp)(const char *const msg)
function pointer to print test information
Ruuvi error codes and error check function.
uint16_t ri_gpio_id_t
port<<8 + pin
structure to configure GPIO test with input and output. These GPIOs must be physically connected on b...