mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-29 00:09:19 +03:00
917410a0a8
* fbt: reworking targets & assets handling WIP * fbt: dist fixes * fbt: moved SD card resources to owning apps * unit_tests: moved resources to app folder * github: updated unit_tests paths * github: packaging fixes * unit_tests: fixes * fbt: assets: internal cleanup * fbt: reworked assets handling * github: unit_tests: reintroducing fixes * minor cleanup * fbt: naming changes to reflect private nature of scons tools * fbt: resources: fixed dist archive paths * docs: updated paths * docs: updated more paths * docs: included "resources" parameter in app manifest docs; updated assets readme * updated gitignore for assets * github: updated action versions * unit_tests: restored timeout; scripts: assets: logging changes * gh: don't upload desktop animations for unit test run Co-authored-by: あく <alleteam@gmail.com>
51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
/**
|
|
* @file furi_hal_pwm.h
|
|
* PWM contol HAL
|
|
*/
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
typedef enum {
|
|
FuriHalPwmOutputIdTim1PA7,
|
|
FuriHalPwmOutputIdLptim2PA4,
|
|
} FuriHalPwmOutputId;
|
|
|
|
/** Enable PWM channel and set parameters
|
|
*
|
|
* @param[in] channel PWM channel (FuriHalPwmOutputId)
|
|
* @param[in] freq Frequency in Hz
|
|
* @param[in] duty Duty cycle value in %
|
|
*/
|
|
void furi_hal_pwm_start(FuriHalPwmOutputId channel, uint32_t freq, uint8_t duty);
|
|
|
|
/** Disable PWM channel
|
|
*
|
|
* @param[in] channel PWM channel (FuriHalPwmOutputId)
|
|
*/
|
|
void furi_hal_pwm_stop(FuriHalPwmOutputId channel);
|
|
|
|
/** Set PWM channel parameters
|
|
*
|
|
* @param[in] channel PWM channel (FuriHalPwmOutputId)
|
|
* @param[in] freq Frequency in Hz
|
|
* @param[in] duty Duty cycle value in %
|
|
*/
|
|
void furi_hal_pwm_set_params(FuriHalPwmOutputId channel, uint32_t freq, uint8_t duty);
|
|
|
|
/** Is PWM channel running?
|
|
*
|
|
* @param[in] channel PWM channel (FuriHalPwmOutputId)
|
|
* @return bool - true if running
|
|
*/
|
|
bool furi_hal_pwm_is_running(FuriHalPwmOutputId channel);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|