STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
Loading...
Searching...
No Matches
Pwm.h
Go to the documentation of this file.
1
10#ifndef PWM_H__
11#define PWM_H__
12
13#include "Pwm_Cfg.h"
14
15void Pwm_Init( const Pwm_ConfigType *ConfigPtr );
16#if PWM_DE_INIT_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
17void Pwm_DeInit( void );
18#endif
19#if PWM_SET_DUTY_CYCLE == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
20void Pwm_SetDutyCycle( Pwm_ChannelType ChannelNumber, uint16 DutyCycle );
21#endif
22#if PWM_SET_PERIOD_AND_DUTY == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
23void Pwm_SetPeriodAndDuty( Pwm_ChannelType ChannelNumber, Pwm_PeriodType Period, uint16 DutyCycle );
24#endif
25#if PWM_SET_OUTPUT_TO_IDLE == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
26void Pwm_SetOutputToIdle( Pwm_ChannelType ChannelNumber );
27#endif
28#if PWM_GET_OUTPUT_STATE == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
30#endif
31#if PWM_NOTIFICATION_SUPPORTED == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
32void Pwm_DisableNotification( Pwm_ChannelType ChannelNumber );
33#endif
34#if PWM_NOTIFICATION_SUPPORTED == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
35void Pwm_EnableNotification( Pwm_ChannelType ChannelNumber, Pwm_EdgeNotificationType Notification );
36#endif
41#if PWM_VERSION_INFO_API == STD_ON /* cppcheck-suppress misra-c2012-20.9 ; it is necesary to use a define for this function */
42void Pwm_GetVersionInfo( Std_VersionInfoType *versioninfo );
43#endif
44#endif
unsigned short uint16
Definition Platform_Types.h:96
void Pwm_SetOutputToIdle(Pwm_ChannelType ChannelNumber)
Pwm Set Output To Idle
Definition Pwm.c:184
void Pwm_EnableNotification(Pwm_ChannelType ChannelNumber, Pwm_EdgeNotificationType Notification)
Pwm Enable Notification
Definition Pwm.c:287
void Pwm_GetVersionInfo(Std_VersionInfoType *versioninfo)
Pwm Get Version Info
Definition Pwm.c:451
Std_ReturnType Pwm_PreparePowerState(Pwm_PowerStateType PowerState, Pwm_PowerStateRequestResultType *Result)
Pwm Prepare Power State
Definition Pwm.c:425
void Pwm_Init(const Pwm_ConfigType *ConfigPtr)
Pwm Initialization
Definition Pwm.c:59
Pwm_OutputStateType Pwm_GetOutputState(Pwm_ChannelType ChannelNumber)
Pwm Get Output State
Definition Pwm.c:219
Std_ReturnType Pwm_GetCurrentPowerState(Pwm_PowerStateType *CurrentPowerState, Pwm_PowerStateRequestResultType *Result)
Pwm Get Current Power State
Definition Pwm.c:358
void Pwm_SetDutyCycle(Pwm_ChannelType ChannelNumber, uint16 DutyCycle)
Pwm Set Duty Cycle
Definition Pwm.c:110
void Pwm_SetPeriodAndDuty(Pwm_ChannelType ChannelNumber, Pwm_PeriodType Period, uint16 DutyCycle)
Pwm Set Period and Duty
Definition Pwm.c:144
void Pwm_DisableNotification(Pwm_ChannelType ChannelNumber)
Pwm Disable Notification
Definition Pwm.c:254
Std_ReturnType Pwm_SetPowerState(Pwm_PowerStateRequestResultType *Result)
Pwm Set Power State
Definition Pwm.c:327
Std_ReturnType Pwm_GetTargetPowerState(Pwm_PowerStateType *TargetPowerState, Pwm_PowerStateRequestResultType *Result)
Pwm Get Target Power State
Definition Pwm.c:389
void Pwm_DeInit(void)
Pwm Deinitialization
Definition Pwm.c:84
enum _Pwm_OutputStateType Pwm_OutputStateType
Output state of a PWM channel.
enum _Pwm_PowerStateType Pwm_PowerStateType
Power state currently active or set as target power state.
uint32 Pwm_PeriodType
Definition of the period of a PWM channel.
Definition Pwm_Types.h:76
uint32 Pwm_ChannelType
Numeric identifier of a PWM channel.
Definition Pwm_Types.h:69
enum _Pwm_PowerStateRequestResultType Pwm_PowerStateRequestResultType
Result of the requests related to power state transitions.
enum _Pwm_EdgeNotificationType Pwm_EdgeNotificationType
Definition of the type of edge notification of a PWM channel.
struct _Pwm_ConfigType Pwm_ConfigType
Hardware unit configuration structure
struct Std_VersionInfoType_Tag Std_VersionInfoType
This structure is used to request the version of a BSW module using the [Module name]_GetVersionInfo(...
uint8 Std_ReturnType
This type can be used as standard API return type which is shared between the RTE and the BSW modules...
Definition Std_Types.h:22