ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_interface_gpio_pwm.h
Go to the documentation of this file.
1 #ifndef RUUVI_INTERFACE_GPIO_PWM_H
2 #define RUUVI_INTERFACE_GPIO_PWM_H
3 #include "ruuvi_driver_error.h"
5 #include "ruuvi_interface_gpio.h"
7 #if RI_GPIO_ENABLED
8 # define RUUVI_NRF5_SDK15_GPIO_PWM_ENABLED RUUVI_NRF5_SDK15_ENABLED
9 #endif
10 
11 #include <stdbool.h>
12 
39 
50 
70  float * const frequency, float * const duty_cycle);
71 
84 
91 bool ri_gpio_pwm_is_init (void);
92 
94 #endif // RUUVI_INTERFACE_GPIO_PWM_H
uint32_t rd_status_t
bitfield for representing errors
rd_status_t ri_gpio_pwm_stop(const ri_gpio_id_t pin)
Stop PWM on given pin.
bool ri_gpio_pwm_is_init(void)
Check if PWM is initialized.
rd_status_t ri_gpio_pwm_init(void)
Run any necessary initialization for PWM.
rd_status_t ri_gpio_pwm_start(const ri_gpio_id_t pin, const ri_gpio_mode_t mode, float *const frequency, float *const duty_cycle)
Start PWM on given pin at given frequency and duty cycle.
rd_status_t ri_gpio_pwm_uninit(void)
Uninitialize PWM.
Header to enable and disable module compilation.
Ruuvi error codes and error check function.
uint16_t ri_gpio_id_t
port<<8 + pin
ri_gpio_mode_t