|
MG32L003 Standard Peripherals Firmware Library
|
PCA driver modules. More...
Modules | |
| PCA_Exported_Constants | |
| PCA_Private_Functions | |
Data Structures | |
| struct | PCA_BaseInitTypeDef |
| PCA Configuration Structure definition. More... | |
| struct | PCA_IC_InitTypeDef |
| PCA Input Capture Configuration Structure definition. More... | |
| struct | PCA_OC_InitTypeDef |
| PCA Output Compare Configuration Structure definition. More... | |
Functions | |
| void | PCA_BaseInit (PCA_BaseInitTypeDef *PCA_InitStruct) |
| Initializes the PCA Unit basic function according to the specified parameters in the PCA_HandleTypeDef. More... | |
| void | PCA_OC_Config (PCA_OC_InitTypeDef *OC_Config) |
| Initializes the PCA output compare Channels according to the specified parameters in the PCA_OC_InitTypeDef. More... | |
| void | PCA_IC_Config (PCA_IC_InitTypeDef *IC_Config) |
| Initializes the PCA input capture Channels according to the specified parameters in the PCA_IC_InitTypeDef. More... | |
| uint16_t | PCA_GetCompareValue (uint32_t Channel) |
| Gets the PCA Capture Compare Register value on runtime. More... | |
| void | PCA_Cmd (FunctionalState NewState) |
| Enables or disables the PCA peripheral. More... | |
| void | PCA_OC_Cmd (uint32_t Channel, FunctionalState NewState) |
| Enables or disables the PCA output compare generation. More... | |
| void | PCA_OC_INVCmd (uint32_t Channel, FunctionalState NewState) |
| Enables or disables the PCA inverse output compare generation. More... | |
| void | PCA_DeInit (void) |
| Deinitializes the PCA peripheral registers to their default reset values. More... | |
| void | PCA_ITConfig (uint8_t PCA_IT, FunctionalState NewState) |
| Enables or disables the specified PCA interrupt. More... | |
| FlagStatus | PCA_GetFlagStatus (uint8_t PCA_FLAG) |
| Checks whether the specified PCA flag is set or not. More... | |
| ITStatus | PCA_GetITStatus (uint8_t PCA_IT) |
| Checks whether the specified PCA interrupt is set or not. More... | |
| void | PCA_ClearITPendingBit (uint8_t PCA_IT) |
| Clears the PCA's interrupt pending bits. More... | |
| void | PCA_ClearFlag (uint8_t PCA_FLAG) |
| Clears the PCA's pending flags. More... | |
| void | PCA_SetPWMDuty (uint32_t Channel, uint8_t Duty) |
| Sets PCA PWM ouput duty cycle. More... | |
| void | PCA_IC0_TriggerConfig (uint32_t PCA_Trigger_ICPolarity) |
| Configures the Channel0 (PCA Input capture). More... | |
| void | PCA_IC1_TriggerConfig (uint32_t PCA_Trigger_ICPolarity) |
| Configures the Channel1 (PCA Input capture). More... | |
| void | PCA_IC2_TriggerConfig (uint32_t PCA_Trigger_ICPolarity) |
| Configures the Channel2 (PCA Input capture). More... | |
| void | PCA_IC3_TriggerConfig (uint32_t PCA_Trigger_ICPolarity) |
| Configures the Channel3 (PCA Input capture). More... | |
| void | PCA_IC4_TriggerConfig (uint32_t PCA_Trigger_ICPolarity) |
| Configures the Channel4 (PCA Input capture). More... | |
PCA driver modules.
| void PCA_BaseInit | ( | PCA_BaseInitTypeDef * | PCA_InitStruct | ) |
Initializes the PCA Unit basic function according to the specified parameters in the PCA_HandleTypeDef.
| PCA_InitStruct | : Ponter to PCA base initialization structure. |
| None |
| void PCA_ClearFlag | ( | uint8_t | PCA_FLAG | ) |
Clears the PCA's pending flags.
| PCA_FLAG | specifies the flags to clear. This parameter can be one of the following values:
|
| None |
| void PCA_ClearITPendingBit | ( | uint8_t | PCA_IT | ) |
Clears the PCA's interrupt pending bits.
| PCA_IT | specifies the PCA interrupt pending bits to clear. This parameter can be any combination of the following values:
|
| None |
| void PCA_Cmd | ( | FunctionalState | NewState | ) |
Enables or disables the PCA peripheral.
| NewState | The new state of the PCA peripheral. This parameter can be: ENABLE or DISABLE. |
| None |
| void PCA_DeInit | ( | void | ) |
Deinitializes the PCA peripheral registers to their default reset values.
| None |
| None |
| uint16_t PCA_GetCompareValue | ( | uint32_t | Channel | ) |
Gets the PCA Capture Compare Register value on runtime.
| Channel | : PCA Channel associated with the capture compare register. This parameter can be one of the following values:
|
| 16-bit | value of the capture/compare register (PCA_CCAPx) |
| FlagStatus PCA_GetFlagStatus | ( | uint8_t | PCA_FLAG | ) |
Checks whether the specified PCA flag is set or not.
| PCA_FLAG | specifies the flag to check. This parameter can be any combination of the following values:
|
| The | new state of PCA_FLAG (SET or RESET). |
| ITStatus PCA_GetITStatus | ( | uint8_t | PCA_IT | ) |
Checks whether the specified PCA interrupt is set or not.
| PCA_FLAG | specifies the interrupt to check. This parameter can be any combination of the following values:
|
| The | new state of PCA_IT (SET or RESET). |
| void PCA_IC0_TriggerConfig | ( | uint32_t | PCA_Trigger_ICPolarity | ) |
Configures the Channel0 (PCA Input capture).
| PCA_Trigger_ICPolarity | The Input Polarity. This parameter can be one of the following values:
|
| None |
| void PCA_IC1_TriggerConfig | ( | uint32_t | PCA_Trigger_ICPolarity | ) |
Configures the Channel1 (PCA Input capture).
| PCA_Trigger_ICPolarity | The Input Polarity. This parameter can be one of the following values:
|
| None |
| void PCA_IC2_TriggerConfig | ( | uint32_t | PCA_Trigger_ICPolarity | ) |
Configures the Channel2 (PCA Input capture).
| PCA_Trigger_ICPolarity | The Input Polarity. This parameter can be one of the following values:
|
| None |
| void PCA_IC3_TriggerConfig | ( | uint32_t | PCA_Trigger_ICPolarity | ) |
Configures the Channel3 (PCA Input capture).
| PCA_Trigger_ICPolarity | The Input Polarity. This parameter can be one of the following values:
|
| None |
| void PCA_IC4_TriggerConfig | ( | uint32_t | PCA_Trigger_ICPolarity | ) |
Configures the Channel4 (PCA Input capture).
| PCA_Trigger_ICPolarity | The Input Polarity. This parameter can be one of the following values:
|
| None |
| void PCA_IC_Config | ( | PCA_IC_InitTypeDef * | IC_Config | ) |
Initializes the PCA input capture Channels according to the specified parameters in the PCA_IC_InitTypeDef.
| IC_Config | : Pointer to PCA input capture configuration structure. |
| None |
| void PCA_ITConfig | ( | uint8_t | PCA_IT, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the specified PCA interrupt.
| PCA_IT | specifies the PCA interrupt source to enable or disable. This parameter can be any combination of the following values:
|
| NewState | The new state of the specified PCA interrupt. This parameter can be: ENABLE or DISABLE. |
| None |
| void PCA_OC_Cmd | ( | uint32_t | Channel, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the PCA output compare generation.
| Channel | : PCA Channel associated with the capture compare register. This parameter can any combination of the following values:
|
| NewState | The new state of the specified PCA channel output compare generation. This parameter can be: ENABLE or DISABLE. |
| None |
| void PCA_OC_Config | ( | PCA_OC_InitTypeDef * | OC_Config | ) |
Initializes the PCA output compare Channels according to the specified parameters in the PCA_OC_InitTypeDef.
| OC_Config | : Pointer to PCA output compare configuration structure. |
| None |
| void PCA_OC_INVCmd | ( | uint32_t | Channel, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the PCA inverse output compare generation.
| Channel | : PCA Channel associated with the capture compare register. This parameter can be any combination of the following values:
|
| NewState | The new state of the specified PCA channle inverse output compare generation. This parameter can be: ENABLE or DISABLE. |
| None |
| void PCA_SetPWMDuty | ( | uint32_t | Channel, |
| uint8_t | Duty | ||
| ) |
Sets PCA PWM ouput duty cycle.
| Channel | : PCA Channel associated with the capture compare register. This parameter can be any combination of the following values:
|
| Duty | PWM output duty configuration, the duty cycle will decrease from 100% to 0.4% with the increase of Duty value from 0 to 255. |
| None |