MG32L003 Standard Peripherals Firmware Library

结构体 | 宏定义 | 函数
mg32l003_pca.h 文件参考

This file contains all the functions prototypes for the PCA firmware library. 更多...

`#include "mg32l003.h"`

浏览源代码.

## 结构体
struct | PCA_BaseInitTypeDef
| PCA Configuration Structure definition 更多...
struct | PCA_IC_InitTypeDef
| PCA Input Capture Configuration Structure definition 更多...
struct | PCA_OC_InitTypeDef
| PCA Output Compare Configuration Structure definition 更多...

## 宏定义
#define | PCA_CLOCK_SOURCE_PCLKDIV32 0x00000000U
#define | PCA_CLOCK_SOURCE_PCLKDIV16 (PCA_MOD_CPS_0)
#define | PCA_CLOCK_SOURCE_PCLKDIV8 (PCA_MOD_CPS_1)
#define | PCA_CLOCK_SOURCE_PCLKDIV4 (PCA_MOD_CPS_1 | PCA_MOD_CPS_0)
#define | PCA_CLOCK_SOURCE_PCLKDIV2 (PCA_MOD_CPS_2)
#define | PCA_CLOCK_SOURCE_TIM10_OVERFLOW (PCA_MOD_CPS_2 | PCA_MOD_CPS_0)
#define | PCA_CLOCK_SOURCE_TIM11_OVERFLOW (PCA_MOD_CPS_2 | PCA_MOD_CPS_1)
#define | PCA_CLOCK_SOURCE_ECI (PCA_MOD_CPS_2 | PCA_MOD_CPS_1 | PCA_MOD_CPS_0)
#define | IS_PCA_CLOCK_COURCE(CLOCK_SOURCE)
#define | PCA_IDLEMODE_DISABLE (0x00000000)
#define | PCA_IDLEMODE_ENABLE (0x00000080)
#define | IS_PCA_IDLEMODE(IDLE_MODE) (((IDLE_MODE) == PCA_IDLEMODE_DISABLE) || ((IDLE_MODE) == PCA_IDLEMODE_ENABLE))
#define | PCA_INPUT_POLARITY_NONE (0x00000000)
#define | PCA_INPUT_POLARITY_FALLING (PCA_CCAPM0_CAPN)
#define | PCA_INPUT_POLARITY_RISING (PCA_CCAPM0_CAPP)
#define | PCA_INPUT_POLARITY_BOTH (PCA_CCAPM0_CAPN | PCA_CCAPM0_CAPP)
#define | IS_PCA_INPUT_POLARATY(INPUT_POLARATY)
#define | PCA_FLAG_CC0 (PCA_CR_CCF0)
#define | PCA_FLAG_CC1 (PCA_CR_CCF1)
#define | PCA_FLAG_CC2 (PCA_CR_CCF2)
#define | PCA_FLAG_CC3 (PCA_CR_CCF3)
#define | PCA_FLAG_CC4 (PCA_CR_CCF4)
#define | PCA_FLAG_OVERFLOW (PCA_CR_CF)
#define | IS_PCA_FLAG(FLAG)
#define | PCA_IT_CC0 (0x01)
#define | PCA_IT_CC1 (0x02)
#define | PCA_IT_CC2 (0x04)
#define | PCA_IT_CC3 (0x08)
#define | PCA_IT_CC4 (0x10)
#define | PCA_IT_OVERFLOW (0x80)
#define | IS_PCA_IT(PCA_IT)
#define | PCA_CHANNEL_0 (0x01)
#define | PCA_CHANNEL_1 (0x02)
#define | PCA_CHANNEL_2 (0x04)
#define | PCA_CHANNEL_3 (0x08)
#define | PCA_CHANNEL_4 (0x10)
#define | PCA_CHANNEL_MASK (0x1F)
#define | IS_PCA_CHANNEL(CHANNEL) (((CHANNEL) & PCA_CHANNEL_MASK) != 0x00)
#define | PCA_OC_ENABLE (PCA_CCAPM0_ECOM)
#define | PCA_OC_DISABLE 0x00000000U
#define | IS_PCA_OC_ENABLE(OC_ENABLE) (((OC_ENABLE) == PCA_OC_ENABLE) || ((OC_ENABLE) == PCA_OC_DISABLE))
#define | PCA_TOG_ENABLE (PCA_CCAPM0_MAT | PCA_CCAPM0_TOG)
#define | PCA_TOG_DISABLE 0x00000000U
#define | IS_PCA_TOG_ENABLE(TOG_ENABLE) (((TOG_ENABLE) == PCA_TOG_ENABLE) || ((TOG_ENABLE) == PCA_TOG_DISABLE))
#define | PCA_PWM_ENABLE (PCA_CCAPM0_PWM)
#define | PCA_PWM_DISABLE 0x00000000U
#define | IS_PCA_PWM_ENABLE(PWM_ENABLE) (((PWM_ENABLE) == PCA_PWM_ENABLE) || ((PWM_ENABLE) == PCA_PWM_DISABLE))

## 函数
void | PCA_BaseInit (PCA_BaseInitTypeDef *PCA_InitStruct)
| Initializes the PCA Unit basic function according to the specified parameters in the PCA_HandleTypeDef. 更多...
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. 更多...
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. 更多...
uint16_t | PCA_GetCompareValue (uint32_t Channel)
| Gets the PCA Capture Compare Register value on runtime 更多...
void | PCA_Cmd (FunctionalState NewState)
| Enables or disables the PCA peripheral. 更多...
void | PCA_OC_Cmd (uint32_t Channel, FunctionalState NewState)
| Enables or disables the PCA output compare generation. 更多...
void | PCA_OC_INVCmd (uint32_t Channel, FunctionalState NewState)
| Enables or disables the PCA inverse output compare generation. 更多...
void | PCA_DeInit (void)
| Deinitializes the PCA peripheral registers to their default reset values. 更多...
void | PCA_ITConfig (uint8_t PCA_IT, FunctionalState NewState)
| Enables or disables the specified PCA interrupt. 更多...
FlagStatus | PCA_GetFlagStatus (uint8_t PCA_FLAG)
| Checks whether the specified PCA flag is set or not. 更多...
ITStatus | PCA_GetITStatus (uint8_t PCA_IT)
| Checks whether the specified PCA interrupt is set or not. 更多...
void | PCA_ClearITPendingBit (uint8_t PCA_IT)
| Clears the PCA's interrupt pending bits. 更多...
void | PCA_ClearFlag (uint8_t PCA_FLAG)
| Clears the PCA's pending flags. 更多...
void | PCA_SetPWMDuty (uint32_t Channel, uint8_t Duty)
| Sets PCA PWM ouput duty cycle. 更多...
void | PCA_IC0_TriggerConfig (uint32_t PCA_Trigger_ICPolarity)
| Configures the Channel0 (PCA Input capture). 更多...
void | PCA_IC1_TriggerConfig (uint32_t PCA_Trigger_ICPolarity)
| Configures the Channel1 (PCA Input capture). 更多...
void | PCA_IC2_TriggerConfig (uint32_t PCA_Trigger_ICPolarity)
| Configures the Channel2 (PCA Input capture). 更多...
void | PCA_IC3_TriggerConfig (uint32_t PCA_Trigger_ICPolarity)
| Configures the Channel3 (PCA Input capture). 更多...
void | PCA_IC4_TriggerConfig (uint32_t PCA_Trigger_ICPolarity)
| Configures the Channel4 (PCA Input capture). 更多...

## 详细描述

This file contains all the functions prototypes for the PCA firmware library.

作者
  megawin Application Team

版本
  V0.0.5

日期
  13-August-2024