PWM contol HAL.
More...
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
|
enum | FuriHalPwmOutputId { FuriHalPwmOutputIdTim1PA7
, FuriHalPwmOutputIdLptim2PA4
} |
|
◆ furi_hal_pwm_is_running()
bool furi_hal_pwm_is_running |
( |
FuriHalPwmOutputId | channel | ) |
|
Is PWM channel running?
- Parameters
-
[in] | channel | PWM channel (FuriHalPwmOutputId) |
- Returns
- bool - true if running
◆ furi_hal_pwm_set_params()
void furi_hal_pwm_set_params |
( |
FuriHalPwmOutputId | channel, |
|
|
uint32_t | freq, |
|
|
uint8_t | duty ) |
Set PWM channel parameters.
- Parameters
-
[in] | channel | PWM channel (FuriHalPwmOutputId) |
[in] | freq | Frequency in Hz |
[in] | duty | Duty cycle value in % |
◆ furi_hal_pwm_start()
void furi_hal_pwm_start |
( |
FuriHalPwmOutputId | channel, |
|
|
uint32_t | freq, |
|
|
uint8_t | duty ) |
Enable PWM channel and set parameters.
- Parameters
-
[in] | channel | PWM channel (FuriHalPwmOutputId) |
[in] | freq | Frequency in Hz |
[in] | duty | Duty cycle value in % |
◆ furi_hal_pwm_stop()
void furi_hal_pwm_stop |
( |
FuriHalPwmOutputId | channel | ) |
|
Disable PWM channel.
- Parameters
-
[in] | channel | PWM channel (FuriHalPwmOutputId) |