ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
#include "ruuvi_driver_error.h"
#include "ruuvi_interface_gpio.h"
#include "ruuvi_interface_gpio_pwm.h"
#include "ruuvi_interface_gpio_test.h"
Go to the source code of this file.
Macros | |
#define | RI_GPIO_PWM_TEST_FREQ_HZ (100U) |
Frequency of test. More... | |
#define | RI_GPIO_PWM_TEST_FREQ_INVALID_MAX_HZ (17000000U) |
Invalid frequency. More... | |
#define | RI_GPIO_PWM_TEST_FREQ_INVALID_MIN_HZ (1U) |
Invalid frequency. More... | |
#define | RI_GPIO_PWM_TEST_DUTY_INVALID_MIN_HZ (-0.1F) |
Invalid duty cycle. More... | |
#define | RI_GPIO_PWM_TEST_DUTY_INVALID_MAX_HZ (1.1F) |
Invalid duty cycle. More... | |
#define | RI_GPIO_PWM_TEST_PERIOD_MS (1000U / RI_GPIO_PWM_TEST_FREQ_HZ) |
Period of one PWM cycle in ms. More... | |
#define | RI_GPIO_PWM_TEST_DC (0.5F) |
Duty cycle in test. More... | |
#define | RI_GPIO_PWM_TEST_TIME_MS (100U) |
Milliseconds to test. More... | |
#define | RI_GPIO_PWM_EXPECT_TRIGS (RI_GPIO_PWM_TEST_TIME_MS / RI_GPIO_PWM_TEST_PERIOD_MS) |
Functions | |
rd_status_t | ri_gpio_interrupt_test_init (const rd_test_gpio_cfg_t cfg) |
Test GPIO interrupt initialization. More... | |
rd_status_t | ri_gpio_pwm_test (const rd_test_gpio_cfg_t cfg) |
Test running PWM on a pin. More... | |
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. More... | |
Tests for PWM.
Definition in file ruuvi_interface_gpio_pwm_test.h.