PER Firmware
Loading...
Searching...
No Matches
pwm.h
Go to the documentation of this file.
1
7#ifndef PHAL_PWM_H
8#define PHAL_PWM_H
9
10#include "stm32g474xx.h"
11
12#include <stdbool.h>
13#include <stdint.h>
14
27bool PHAL_PWM_init(TIM_TypeDef* tim, uint32_t frequency_hz, uint8_t channels_en);
28
38bool PHAL_PWM_setPercent(TIM_TypeDef* tim, uint8_t channel, uint8_t percent);
39
40#endif
bool PHAL_PWM_init(TIM_TypeDef *tim, uint32_t frequency_hz, uint8_t channels_en)
Initialize consecutive PWM channels beginning at channel 1.
Definition pwm.c:12
bool PHAL_PWM_setPercent(TIM_TypeDef *tim, uint8_t channel, uint8_t percent)
Set a PWM channel's duty cycle.
Definition pwm.c:65