|
STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
|
Pwm Driver Types More...
#include "Registers.h"Go to the source code of this file.
Data Structures | |
| struct | _Pwm_ConfigType |
| Hardware unit configuration structure More... | |
| struct | _Pwm_HwUnit |
| Hardware control unit structure More... | |
Macros | |
| #define | PWM_ID_INIT 0x00u |
| #define | PWM_ID_DE_INIT 0x01u |
| #define | PWM_ID_SET_DUTY_CYCLE 0x02u |
| #define | PWM_ID_SET_PERIOD_AND_DUTY 0x03u |
| #define | PWM_ID_SET_OUTPUT_TO_IDLE 0x04u |
| #define | PWM_ID_GET_OUTPUT_STATE 0x05u |
| #define | PWM_ID_DISABLE_NOTIFICATION 0x06u |
| #define | PWM_ID_ENABLE_NOTIFICATION 0x07u |
| #define | PWM_ID_SET_POWER_STATE 0x09u |
| #define | PWM_ID_GET_CURRENT_POWER_STATE 0x0au |
| #define | PWM_ID_GET_TARGET_POWER_STATE 0x0bu |
| #define | PWM_ID_PREPARE_POWER_STATE 0x0cu |
| #define | PWM_ID_GET_VERSION_INFO 0x08u |
| #define | PWM_E_INIT_FAILED 0x10u |
| #define | PWM_E_UNINIT 0x11u |
| #define | PWM_E_PARAM_CHANNEL 0x12u |
| #define | PWM_E_PERIOD_UNCHANGEABLE 0x13u |
| #define | PWM_E_ALREADY_INITIALIZED 0x14u |
| #define | PWM_E_PARAM_POINTER 0x15u |
| #define | PWM_E_POWER_STATE_NOT_SUPPORTED 0x17u |
| #define | PWM_E_TRANSITION_NOT_POSSIBLE 0x18u |
| #define | PWM_E_PERIPHERAL_NOT_PREPARED 0x19u |
| #define | PWM_E_NOT_DISENGAGED 0x16u |
| #define | PWM_STATIC static |
Typedefs | |
| typedef uint32 | Pwm_ChannelType |
| Numeric identifier of a PWM channel. | |
| typedef uint32 | Pwm_PeriodType |
| Definition of the period of a PWM channel. | |
| typedef enum _Pwm_OutputStateType | Pwm_OutputStateType |
| Output state of a PWM channel. | |
| typedef enum _Pwm_EdgeNotificationType | Pwm_EdgeNotificationType |
| Definition of the type of edge notification of a PWM channel. | |
| typedef enum _Pwm_ChannelClassType | Pwm_ChannelClassType |
| Defines the class of a PWM channel. | |
| typedef enum _Pwm_PowerStateRequestResultType | Pwm_PowerStateRequestResultType |
| Result of the requests related to power state transitions. | |
| typedef enum _Pwm_PowerStateType | Pwm_PowerStateType |
| Power state currently active or set as target power state. | |
| typedef struct _Pwm_ConfigType | Pwm_ConfigType |
| Hardware unit configuration structure | |
| typedef struct _Pwm_HwUnit | Pwm_HwUnit |
| Hardware control unit structure | |
Enumerations | |
| enum | _Pwm_OutputStateType { PWM_HIGH = 0x00 , PWM_LOW } |
| Output state of a PWM channel. More... | |
| enum | _Pwm_EdgeNotificationType { PWM_RISING_EDGE = 0x00 , PWM_FALLING_EDGE , PWM_BOTH_EDGES } |
| Definition of the type of edge notification of a PWM channel. More... | |
| enum | _Pwm_ChannelClassType { PWM_VARIABLE_PERIOD = 0x00 , PWM_FIXED_PERIOD , PWM_FIXED_PERIOD_SHIFTED } |
| Defines the class of a PWM channel. More... | |
| enum | _Pwm_PowerStateRequestResultType { PWM_SERVICE_ACCEPTED = 0x00 , PWM_NOT_INIT , PWM_SEQUENCE_ERROR , PWM_HW_FAILURE , PWM_POWER_STATE_NOT_SUPP , PWM_TRANS_NOT_POSSIBLE } |
| Result of the requests related to power state transitions. More... | |
| enum | _Pwm_PowerStateType { PWM_FULL_POWER = 0x00 } |
| Power state currently active or set as target power state. More... | |
| enum | Pwm_StatusType { PWM_STATE_UNINIT , PWM_STATE_INIT } |
| PWM driver Status More... | |
Pwm Driver Types
The header contains the type definitions that are used by the Pwm module. The file is implemented as a means of abstraction from the hardware, making the low level interfaces available for upper layers.
| typedef enum _Pwm_ChannelClassType Pwm_ChannelClassType |
Defines the class of a PWM channel.
| typedef uint32 Pwm_ChannelType |
Numeric identifier of a PWM channel.
| typedef struct _Pwm_ConfigType Pwm_ConfigType |
Hardware unit configuration structure
This is the type of data structure containing the initialization data for the PWM driver. The contents of the initialization data structure are hardware specific.
| typedef enum _Pwm_EdgeNotificationType Pwm_EdgeNotificationType |
Definition of the type of edge notification of a PWM channel.
| typedef struct _Pwm_HwUnit Pwm_HwUnit |
Hardware control unit structure
This structure contains the hardware unit configuration and the state of the hardware unit pointers to controller structures.
| typedef enum _Pwm_OutputStateType Pwm_OutputStateType |
Output state of a PWM channel.
| typedef uint32 Pwm_PeriodType |
Definition of the period of a PWM channel.
Result of the requests related to power state transitions.
| typedef enum _Pwm_PowerStateType Pwm_PowerStateType |
Power state currently active or set as target power state.
Defines the class of a PWM channel.
Definition of the type of edge notification of a PWM channel.
| enum _Pwm_OutputStateType |
Output state of a PWM channel.
| Enumerator | |
|---|---|
| PWM_HIGH | The PWM channel is in high state |
| PWM_LOW | The PWM channel is in low state |
Result of the requests related to power state transitions.
| Enumerator | |
|---|---|
| PWM_SERVICE_ACCEPTED | Power state change executed. |
| PWM_NOT_INIT | PWM Module not initialized. |
| PWM_SEQUENCE_ERROR | Wrong API call sequence. |
| PWM_HW_FAILURE | Hardware failure prevents state change. |
| PWM_POWER_STATE_NOT_SUPP | Power State not supported. |
| PWM_TRANS_NOT_POSSIBLE | Transition not possible or HW busy. |
| enum _Pwm_PowerStateType |
Power state currently active or set as target power state.
| Enumerator | |
|---|---|
| PWM_FULL_POWER | Full Power |
| enum Pwm_StatusType |