宏定义 | |
#define | PER_LIB_MCU_MUODEL STC8Ax |
如果没有定义这个宏,默认为STC8Ax。 If the mirco is undefined,select to STC8Ax 更多... | |
#define | PER_LIB_PCA_CTRL 1 |
如果没有定义这个宏,默认为0。 If the mirco is undefined,select to "0" 更多... | |
#define | PER_LIB_PCA_INIT_CTRL 1 |
如果没有定义这个宏,默认为0。 If the mirco is undefined,select to "0" 更多... | |
#define | PER_LIB_PCA_NVIC_CTRL 1 |
如果没有定义这个宏,默认为0。 If the mirco is undefined,select to "0" 更多... | |
#define | PER_LIB_PCA_WORK_CTRL 1 |
如果没有定义这个宏,默认为0。 If the mirco is undefined,select to "0" 更多... | |
#define | PCA0_WORK_STOP() do{CCAPM0 = 0;}while(0) |
PCA0停止工作宏函数。 更多... | |
#define | PCA1_WORK_STOP() do{CCAPM1 = 0;}while(0) |
PCA1停止工作宏函数。 更多... | |
#define | PCA2_WORK_STOP() do{CCAPM2 = 0;}while(0) |
PCA2停止工作宏函数。 更多... | |
#define | PCA3_WORK_STOP() do{CCAPM3 = 0;}while(0) |
PCA3停止工作宏函数。 更多... | |
#define | PCA0_PWM_6BITS_CTRL(duty) |
PCA0做6位PWM时,占空比调节宏函数。 更多... | |
#define | PCA0_PWM_7BITS_CTRL(duty) |
PCA0做7位PWM时,占空比调节宏函数。 更多... | |
#define | PCA0_PWM_8BITS_CTRL(duty) |
PCA0做8位PWM时,占空比调节宏函数。 更多... | |
#define | PCA0_PWM_10BITS_CTRL(duty) |
PCA0做10位PWM时,占空比调节宏函数。 更多... | |
#define | PCA1_PWM_6BITS_CTRL(duty) |
PCA1做6位PWM时,占空比调节宏函数。 更多... | |
#define | PCA1_PWM_7BITS_CTRL(duty) |
PCA1做7位PWM时,占空比调节宏函数。 更多... | |
#define | PCA1_PWM_8BITS_CTRL(duty) |
PCA1做8位PWM时,占空比调节宏函数。 更多... | |
#define | PCA1_PWM_10BITS_CTRL(duty) |
PCA1做10位PWM时,占空比调节宏函数。 更多... | |
#define | PCA2_PWM_6BITS_CTRL(duty) |
PCA2做6位PWM时,占空比调节宏函数。 更多... | |
#define | PCA2_PWM_7BITS_CTRL(duty) |
PCA2做7位PWM时,占空比调节宏函数。 更多... | |
#define | PCA2_PWM_8BITS_CTRL(duty) |
PCA2做8位PWM时,占空比调节宏函数。 更多... | |
#define | PCA2_PWM_10BITS_CTRL(duty) |
PCA2做10位PWM时,占空比调节宏函数。 更多... | |
#define | PCA3_PWM_6BITS_CTRL(duty) |
PCA3做6位PWM时,占空比调节宏函数。 更多... | |
#define | PCA3_PWM_7BITS_CTRL(duty) |
PCA3做7位PWM时,占空比调节宏函数。 更多... | |
#define | PCA3_PWM_8BITS_CTRL(duty) |
PCA3做8位PWM时,占空比调节宏函数。 更多... | |
#define | PCA3_PWM_10BITS_CTRL(duty) |
PCA3做10位PWM时,占空比调节宏函数。 更多... | |
#define | PCA_CNT_GET_FLAG() (CF) |
获取PCA计数器溢出(中断)标志位。 更多... | |
#define | PCA_CNT_CLEAR_FLAG() do{CF = 0;}while(0) |
清除PCA计数器溢出(中断)标志位。 更多... | |
#define | PCA0_GET_FLAG() (CCF0) |
获取PCA0计数器溢出(中断)标志位。 更多... | |
#define | PCA1_GET_FLAG() (CCF1) |
获取PCA1计数器溢出(中断)标志位。 更多... | |
#define | PCA2_GET_FLAG() (CCF2) |
获取PCA2计数器溢出(中断)标志位。 更多... | |
#define | PCA3_GET_FLAG() (CCF3) |
获取PCA3计数器溢出(中断)标志位。 更多... | |
#define | PCA0_CLEAR_FLAG() do{CCF0 = 0;}while(0) |
清除PCA0计数器溢出(中断)标志位。 更多... | |
#define | PCA1_CLEAR_FLAG() do{CCF1 = 0;}while(0) |
清除PCA1计数器溢出(中断)标志位。 更多... | |
#define | PCA2_CLEAR_FLAG() do{CCF2 = 0;}while(0) |
清除PCA2计数器溢出(中断)标志位。 更多... | |
#define | PCA3_CLEAR_FLAG() do{CCF3 = 0;}while(0) |
清除PCA3计数器溢出(中断)标志位。 更多... | |
#define | NVIC_PCA_CNT_CTRL(run) |
PCA计数器中断控制宏函数。 更多... | |
#define | NVIC_PCA_PRI(pri) |
PCA选择中断优先级宏函数。 更多... | |
#define | NVIC_PCA0_CTRL(run) |
PCA0中断控制宏函数。 更多... | |
#define | NVIC_PCA1_CTRL(run) |
PCA1中断控制宏函数。 更多... | |
#define | NVIC_PCA2_CTRL(run) |
PCA2中断控制宏函数。 更多... | |
#define | NVIC_PCA3_CTRL(run) |
PCA3中断控制宏函数。 更多... | |
枚举 | |
enum | PCAType_Type { PCA_TYPE_CAP = 0X00 , PCA_TYPE_PWM = 0x42 , PCA_TYPE_TIM = 0x48 , PCA_TYPE_POP = 0x4C } |
PCA工作类型枚举体 更多... | |
enum | PCA_CAPMode_Type { PCA_CAP_Mode_Falling = 0x01 , PCA_CAP_Mode_Rising = 0X02 , PCA_CAP_Mode_Edge = 0x03 } |
PCA做CAP时,触发模式枚举体。 更多... | |
enum | PCACLKSrc_Type { PCA_SCLK_DIV_12 = 0x00 , PCA_SCLK_DIV_2 = 0x02 , PCA_TIMER0 = 0x04 , PCA_ECI = 0x06 , PCA_SCLK_DIV_1 = 0x08 , PCA_SCLK_DIV_4 = 0x0A , PCA_SCLK_DIV_6 = 0x0C , PCA_SCLK_DIV_8 = 0x0E } |
PCA时钟源枚举体 更多... | |
enum | PCA_PWMBits_Type { PCA_PWM_8Bits = 0x00 , PCA_PWM_7Bits = 0x01 , PCA_PWM_6Bits = 0x02 , PCA_PWM_10Bits = 0x03 } |
PCA做PWM时,分辨率枚举体。 更多... | |
enum | PCA_CAPTri_Type { PCA_CAPTri_Null = 0x00 , PCA_CAPTri_Falling = 0x10 , PCA_CAPTri_Rising = 0x20 , PCA_CAPTri_Edge = 0x30 } |
PCA做CAP时,触发中断方式枚举体。 更多... | |
#define NVIC_PCA0_CTRL | ( | run | ) |
#define NVIC_PCA1_CTRL | ( | run | ) |
#define NVIC_PCA2_CTRL | ( | run | ) |
#define NVIC_PCA3_CTRL | ( | run | ) |
#define NVIC_PCA_CNT_CTRL | ( | run | ) |
#define NVIC_PCA_PRI | ( | pri | ) |
#define PCA0_CLEAR_FLAG | ( | ) | do{CCF0 = 0;}while(0) |
清除PCA0计数器溢出(中断)标志位。
Clear the PCA0 overflow (interrupt) flag macro function.
#define PCA0_GET_FLAG | ( | ) | (CCF0) |
获取PCA0计数器溢出(中断)标志位。
Get the PCA0 overflow (interrupt) flag macro function.
#define PCA0_PWM_10BITS_CTRL | ( | duty | ) |
PCA0做10位PWM时,占空比调节宏函数。
When PCA0 is used as 10-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA0_PWM_6BITS_CTRL | ( | duty | ) |
PCA0做6位PWM时,占空比调节宏函数。
When PCA0 is used as 6-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA0_PWM_7BITS_CTRL | ( | duty | ) |
PCA0做7位PWM时,占空比调节宏函数。
When PCA0 is used as 7-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA0_PWM_8BITS_CTRL | ( | duty | ) |
PCA0做8位PWM时,占空比调节宏函数。
When PCA0 is used as 8-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA0_WORK_STOP | ( | ) | do{CCAPM0 = 0;}while(0) |
PCA0停止工作宏函数。
PCA0 stops working macro function.
#define PCA1_CLEAR_FLAG | ( | ) | do{CCF1 = 0;}while(0) |
清除PCA1计数器溢出(中断)标志位。
Clear the PCA1 overflow (interrupt) flag macro function.
#define PCA1_GET_FLAG | ( | ) | (CCF1) |
获取PCA1计数器溢出(中断)标志位。
Get the PCA1 overflow (interrupt) flag macro function.
#define PCA1_PWM_10BITS_CTRL | ( | duty | ) |
PCA1做10位PWM时,占空比调节宏函数。
When PCA1 is used as 10-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA1_PWM_6BITS_CTRL | ( | duty | ) |
PCA1做6位PWM时,占空比调节宏函数。
When PCA1 is used as 6-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA1_PWM_7BITS_CTRL | ( | duty | ) |
PCA1做7位PWM时,占空比调节宏函数。
When PCA1 is used as 7-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA1_PWM_8BITS_CTRL | ( | duty | ) |
PCA1做8位PWM时,占空比调节宏函数。
When PCA1 is used as 8-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA1_WORK_STOP | ( | ) | do{CCAPM1 = 0;}while(0) |
PCA1停止工作宏函数。
PCA1 stops working macro function.
#define PCA2_CLEAR_FLAG | ( | ) | do{CCF2 = 0;}while(0) |
清除PCA2计数器溢出(中断)标志位。
Clear the PCA2 overflow (interrupt) flag macro function.
#define PCA2_GET_FLAG | ( | ) | (CCF2) |
获取PCA2计数器溢出(中断)标志位。
Get the PCA2 overflow (interrupt) flag macro function.
#define PCA2_PWM_10BITS_CTRL | ( | duty | ) |
PCA2做10位PWM时,占空比调节宏函数。
When PCA2 is used as 10-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA2_PWM_6BITS_CTRL | ( | duty | ) |
PCA2做6位PWM时,占空比调节宏函数。
When PCA2 is used as 6-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA2_PWM_7BITS_CTRL | ( | duty | ) |
PCA2做7位PWM时,占空比调节宏函数。
When PCA2 is used as 7-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA2_PWM_8BITS_CTRL | ( | duty | ) |
PCA2做8位PWM时,占空比调节宏函数。
When PCA2 is used as 8-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA2_WORK_STOP | ( | ) | do{CCAPM2 = 0;}while(0) |
PCA2停止工作宏函数。
PCA2 stops working macro function.
#define PCA3_CLEAR_FLAG | ( | ) | do{CCF3 = 0;}while(0) |
清除PCA3计数器溢出(中断)标志位。
Clear the PCA3 overflow (interrupt) flag macro function.
#define PCA3_GET_FLAG | ( | ) | (CCF3) |
获取PCA3计数器溢出(中断)标志位。
Get the PCA0 overflow (interrupt) flag macro function.
#define PCA3_PWM_10BITS_CTRL | ( | duty | ) |
PCA3做10位PWM时,占空比调节宏函数。
When PCA3 is used as 10-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA3_PWM_6BITS_CTRL | ( | duty | ) |
PCA3做6位PWM时,占空比调节宏函数。
When PCA3 is used as 6-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA3_PWM_7BITS_CTRL | ( | duty | ) |
PCA3做7位PWM时,占空比调节宏函数。
When PCA3 is used as 7-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA3_PWM_8BITS_CTRL | ( | duty | ) |
PCA3做8位PWM时,占空比调节宏函数。
When PCA3 is used as 8-bit precision PWM, set the duty cycle macro function.
[in] | duty | 占空比。PWM duty. |
#define PCA3_WORK_STOP | ( | ) | do{CCAPM3 = 0;}while(0) |
PCA3停止工作宏函数。
PCA3 stops working macro function.
#define PCA_CNT_CLEAR_FLAG | ( | ) | do{CF = 0;}while(0) |
清除PCA计数器溢出(中断)标志位。
Clear the PCA counter overflow (interrupt) flag macro function.
#define PCA_CNT_GET_FLAG | ( | ) | (CF) |
获取PCA计数器溢出(中断)标志位。
Get the PCA counter overflow (interrupt) flag macro function.
#define PER_LIB_MCU_MUODEL STC8Ax |
如果没有定义这个宏,默认为STC8Ax。 If the mirco is undefined,select to STC8Ax
#define PER_LIB_PCA_CTRL 1 |
如果没有定义这个宏,默认为0。 If the mirco is undefined,select to "0"
#define PER_LIB_PCA_INIT_CTRL 1 |
如果没有定义这个宏,默认为0。 If the mirco is undefined,select to "0"
#define PER_LIB_PCA_NVIC_CTRL 1 |
如果没有定义这个宏,默认为0。 If the mirco is undefined,select to "0"
#define PER_LIB_PCA_WORK_CTRL 1 |
如果没有定义这个宏,默认为0。 If the mirco is undefined,select to "0"
enum PCA_CAPMode_Type |
enum PCA_CAPTri_Type |
PCA做CAP时,触发中断方式枚举体。
PCA CAP interrupt trigger enumenumeration.
enum PCA_PWMBits_Type |
enum PCACLKSrc_Type |
PCA时钟源枚举体
PCA working clock enumeration body.
enum PCAType_Type |
FSCSTATE GPIO_PCA_SWPort | ( | GPIOSWPort_Type | port | ) |
PCA切换复用IO函数。
PCA switch out port control function.
[in] | port | 复用IO枚举体。IO switch enumerator. |
FSCSTATE NVIC_PCA0_PWM_CAP_Init | ( | PCA_CAPTri_Type | triMode, |
BOOL | run | ||
) |
PCA0做PWM或CAP中断初始化函数。
PCA0 PWM and CAP NVIC function.
[in] | triMode | 触发模式。 Interrupt trigger mode. |
[in] | run | 使能控制位。enable control. |
PCA0做TIMER或POP中断初始化函数。
PCA0 Timer and POP NVIC function .
[in] | run | 使能控制位。enable control. |
FSCSTATE NVIC_PCA1_PWM_CAP_Init | ( | PCA_CAPTri_Type | triMode, |
BOOL | run | ||
) |
PCA1做PWM或CAP中断初始化函数。
PCA1 PWM and CAP NVIC function.
[in] | triMode | 触发模式。 Interrupt trigger mode. |
[in] | run | 使能控制位。enable control. |
PCA1做TIMER或POP中断初始化函数。
PCA1 Timer and POP NVIC function .
[in] | run | 使能控制位。enable control. |
FSCSTATE NVIC_PCA2_PWM_CAP_Init | ( | PCA_CAPTri_Type | triMode, |
BOOL | run | ||
) |
PCA2做PWM或CAP中断初始化函数。
PCA2 PWM and CAP NVIC function.
[in] | triMode | 触发模式。 Interrupt trigger mode. |
[in] | run | 使能控制位。enable control. |
PCA2做TIMER或POP中断初始化函数。
PCA2 Timer and POP NVIC function .
[in] | run | 使能控制位。enable control. |
FSCSTATE NVIC_PCA3_PWM_CAP_Init | ( | PCA_CAPTri_Type | triMode, |
BOOL | run | ||
) |
PCA3做PWM或CAP中断初始化函数。
PCA3 PWM and CAP NVIC function.
[in] | triMode | 触发模式。 Interrupt trigger mode. |
[in] | run | 使能控制位。enable control. |
PCA3做TIMER或POP中断初始化函数。
PCA3 Timer and POP NVIC function .
[in] | run | 使能控制位。enable control. |
FSCSTATE NVIC_PCA_CNT_Init | ( | NVICPri_Type | pri, |
BOOL | run | ||
) |
PCA计数器中断初始化函数。
PCA Counter NVIC function.
[in] | pri | 中断优先级。interrupt priority. |
[in] | run | 使能控制位。enable control. |
FSCSTATE PCA0_CAP_Init | ( | PCA_CAPMode_Type | mode | ) |
PCA0做CAP初始化,必须放在PCA计数器初始化之前。
PCA0 CAP init function,it must first is initialized.
[in] | mode | 捕获模式。Capture mode. |
PCA0做POP初始化,必须放在PCA计数器初始化之前。
PCA0 POP init function,it must first is initialized.
[in] | fre | 脉冲输出频率。Output frequency. |
FSCSTATE PCA0_PWM_Init | ( | PCA_PWMBits_Type | pwmBits, |
uint16_t | duty | ||
) |
PCA0做PWM初始化,必须放在PCA计数器初始化之前。
PCA0 PWM init function,it must first is initialized.
[in] | pwmBits | PWM分辨率。PWM accuracy of bits. |
[in] | duty | PWM占空比。PWM duty. |
PCA0做TIMER初始化,必须放在PCA计数器初始化之前。
PCA0 TIMER init function,it must first is initialized.
[in] | time | 定时时间。Timing. |
void PCA0_TIM_POP_ReValue | ( | void | ) |
PCA0做TIMER或POP时,重载载计数器。
PCA0 TIM and POP reload value function.
[in] | None. |
FSCSTATE PCA1_CAP_Init | ( | PCA_CAPMode_Type | mode | ) |
PCA1做CAP初始化,必须放在PCA计数器初始化之前。
PCA1 CAP init function,it must first is initialized.
[in] | mode | 捕获模式。Capture mode. |
PCA1做POP初始化,必须放在PCA计数器初始化之前。
PCA1 POP init function,it must first is initialized.
[in] | fre | 脉冲输出频率。Output frequency. |
FSCSTATE PCA1_PWM_Init | ( | PCA_PWMBits_Type | pwmBits, |
uint16_t | duty | ||
) |
PCA1做PWM初始化,必须放在PCA计数器初始化之前。
PCA1 PWM init function,it must first is initialized.
[in] | pwmBits | PWM分辨率。PWM accuracy of bits. |
[in] | duty | PWM占空比。PWM duty. |
PCA1做TIMER初始化,必须放在PCA计数器初始化之前。
PCA1 TIMER init function,it must first is initialized.
[in] | time | 定时时间。Timing. |
void PCA1_TIM_POP_ReValue | ( | void | ) |
PCA1做TIMER或POP时,重载载计数器。
PCA1 TIM and POP reload value function.
[in] | None. |
FSCSTATE PCA2_CAP_Init | ( | PCA_CAPMode_Type | mode | ) |
PCA2做CAP初始化,必须放在PCA计数器初始化之前。
PCA2 CAP init function,it must first is initialized.
[in] | mode | 捕获模式。Capture mode. |
PCA2做POP初始化,必须放在PCA计数器初始化之前。
PCA2 POP init function,it must first is initialized.
[in] | fre | 脉冲输出频率。Output frequency. |
FSCSTATE PCA2_PWM_Init | ( | PCA_PWMBits_Type | pwmBits, |
uint16_t | duty | ||
) |
PCA2做PWM初始化,必须放在PCA计数器初始化之前。
PCA2 PWM init function,it must first is initialized.
[in] | pwmBits | PWM分辨率。PWM accuracy of bits. |
[in] | duty | PWM占空比。PWM duty. |
PCA2做TIMER初始化,必须放在PCA计数器初始化之前。
PCA2 TIMER init function,it must first is initialized.
[in] | time | 定时时间。Timing. |
void PCA2_TIM_POP_ReValue | ( | void | ) |
PCA2做TIMER或POP时,重载载计数器。
PCA2 TIM and POP reload value function.
[in] | None. |
FSCSTATE PCA3_CAP_Init | ( | PCA_CAPMode_Type | mode | ) |
PCA3做CAP初始化,必须放在PCA计数器初始化之前。
PCA3 CAP init function,it must first is initialized.
[in] | mode | 捕获模式。Capture mode. |
PCA3做POP初始化,必须放在PCA计数器初始化之前。
PCA3 POP init function,it must first is initialized.
[in] | fre | 脉冲输出频率。Output frequency. |
FSCSTATE PCA3_PWM_Init | ( | PCA_PWMBits_Type | pwmBits, |
uint16_t | duty | ||
) |
PCA3做PWM初始化,必须放在PCA计数器初始化之前。
PCA3 PWM init function,it must first is initialized.
[in] | pwmBits | PWM分辨率。PWM accuracy of bits. |
[in] | duty | PWM占空比。PWM duty. |
PCA3做TIMER初始化,必须放在PCA计数器初始化之前。
PCA3 TIMER init function,it must first is initialized.
[in] | time | 定时时间。Timing. |
void PCA3_TIM_POP_ReValue | ( | void | ) |
PCA3做TIMER或POP时,重载载计数器。
PCA3 TIM and POP reload value function.
[in] | None. |
FSCSTATE PCA_CNT_Init | ( | PCACLKSrc_Type | clkSrc, |
BOOL | run | ||
) |
PCA计数器初始化,必须放在所有PCA函数的后面。
PCA counter init function,It must be initialized last.
[in] | clkSrc | PCA时钟源。PCA clock source. |
[in] | run | 使能控制位.enable control. |