PER Firmware
Loading...
Searching...
No Matches
pwm_priv.h File Reference

Header file for private STM32G4 PWM register implementation. More...

#include <stdbool.h>
#include <stdint.h>
#include "stm32g4xx.h"
Include dependency graph for pwm_priv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PWM_PRIV_TimerInfo_t
 Timer-specific information required to configure PWM. More...
 

Functions

bool PHAL_PWM_priv_getTimerInfo (const TIM_TypeDef *tim, PWM_PRIV_TimerInfo_t *info)
 Get timer specific information.
 
bool PHAL_PWM_priv_enableTimerClock (const TIM_TypeDef *tim)
 Enable the peripheral clock for a timer.
 
bool PHAL_PWM_priv_initTimer (TIM_TypeDef *tim, uint16_t prescaler, uint16_t auto_reload, uint8_t channels_en, bool requires_main_out_en)
 Configure timer registers for PWM operation.
 
bool PHAL_PWM_priv_setCompare (TIM_TypeDef *tim, uint8_t channel, uint32_t compare_value)
 Set the capture/compare value for a PWM channel.
 
uint32_t PHAL_PWM_priv_getAutoReload (const TIM_TypeDef *tim)
 Get the timer auto-reload register value.
 

Detailed Description

Header file for private STM32G4 PWM register implementation.

Author
Natasha Pandit (npand.nosp@m.it@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ PHAL_PWM_priv_enableTimerClock()

bool PHAL_PWM_priv_enableTimerClock ( const TIM_TypeDef * tim)

Enable the peripheral clock for a timer.

Here is the caller graph for this function:

◆ PHAL_PWM_priv_getAutoReload()

uint32_t PHAL_PWM_priv_getAutoReload ( const TIM_TypeDef * tim)

Get the timer auto-reload register value.

Here is the caller graph for this function:

◆ PHAL_PWM_priv_getTimerInfo()

bool PHAL_PWM_priv_getTimerInfo ( const TIM_TypeDef * tim,
PWM_PRIV_TimerInfo_t * info )

Get timer specific information.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PHAL_PWM_priv_initTimer()

bool PHAL_PWM_priv_initTimer ( TIM_TypeDef * tim,
uint16_t prescaler,
uint16_t auto_reload,
uint8_t channels_en,
bool requires_main_out_en )

Configure timer registers for PWM operation.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PHAL_PWM_priv_setCompare()

bool PHAL_PWM_priv_setCompare ( TIM_TypeDef * tim,
uint8_t channel,
uint32_t compare_value )

Set the capture/compare value for a PWM channel.

Here is the caller graph for this function: