您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CY_SET_REG16函数代码示例

51自学网 2021-06-01 20:08:33
  C++
这篇教程C++ CY_SET_REG16函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CY_SET_REG16函数的典型用法代码示例。如果您正苦于以下问题:C++ CY_SET_REG16函数的具体用法?C++ CY_SET_REG16怎么用?C++ CY_SET_REG16使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CY_SET_REG16函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ShiftReg_1_RestoreConfig

/******************************************************************************** Function Name: ShiftReg_1_RestoreConfig********************************************************************************** Summary:*  Restores Shift Register configuration.** Parameters:*  None.** Return:*  None.********************************************************************************/void ShiftReg_1_RestoreConfig(void) {    /* Restore tha data, saved by SaveConfig()function */    #if (CY_PSOC3_ES2 || CY_PSOC5_ES1)        CY_SET_REG16(ShiftReg_1_SHIFT_REG_LSB_PTR, ShiftReg_1_backup.saveSrA0Reg);            CY_SET_REG16(ShiftReg_1_SHIFT_REG_VALUE_LSB_PTR, ShiftReg_1_backup.saveSrA1Reg);            ShiftReg_1_SR_STATUS_MASK = ShiftReg_1_backup.saveSrIntMask;    #else            CY_SET_REG16(ShiftReg_1_SHIFT_REG_LSB_PTR, ShiftReg_1_backup.saveSrA0Reg);            CY_SET_REG16(ShiftReg_1_SHIFT_REG_VALUE_LSB_PTR, ShiftReg_1_backup.saveSrA1Reg);    #endif /*(CY_PSOC3_ES2 || CY_PSOC5_ES1)*/}
开发者ID:marcelocoelho,项目名称:Pulse-Firmware,代码行数:27,


示例2: Timer_3_WriteCounter

/******************************************************************************** Function Name: Timer_3_WriteCounter********************************************************************************** Summary:*  This funtion is used to set the counter to a specific value** Parameters:*  counter:  New counter value.** Return:*  void********************************************************************************/void Timer_3_WriteCounter(uint16 counter) /                                   {   #if(Timer_3_UsingFixedFunction)        /* This functionality is removed until a FixedFunction HW update to         * allow this register to be written         */        CY_SET_REG16(Timer_3_COUNTER_LSB_PTR, (uint16)counter);            #else        CY_SET_REG16(Timer_3_COUNTER_LSB_PTR, counter);    #endif /* Set Write Counter only for the UDB implementation (Write Counter not available in fixed function Timer */}
开发者ID:proyectos1Insepet,项目名称:MUX,代码行数:27,


示例3: PWM_Counter_WriteCounter

/******************************************************************************** Function Name: PWM_Counter_WriteCounter********************************************************************************* Summary:*   This funtion is used to set the counter to a specific value** Parameters:  *  counter:  New counter value. ** Return: *  void ********************************************************************************/void PWM_Counter_WriteCounter(uint16 counter) /                                   {    #if(PWM_Counter_UsingFixedFunction)        /* assert if block is already enabled */        CYASSERT (!(PWM_Counter_GLOBAL_ENABLE & PWM_Counter_BLOCK_EN_MASK));        /* If block is disabled, enable it and then write the counter */        PWM_Counter_GLOBAL_ENABLE |= PWM_Counter_BLOCK_EN_MASK;        CY_SET_REG16(PWM_Counter_COUNTER_LSB_PTR, (uint16)counter);        PWM_Counter_GLOBAL_ENABLE &= ~PWM_Counter_BLOCK_EN_MASK;    #else        CY_SET_REG16(PWM_Counter_COUNTER_LSB_PTR, counter);    #endif /* (PWM_Counter_UsingFixedFunction) */}
开发者ID:kelime,项目名称:lab-of-cars,代码行数:27,


示例4: QuadDecoder_Cnt16_WriteCounter

/******************************************************************************** Function Name: QuadDecoder_Cnt16_WriteCounter********************************************************************************* Summary:*   This funtion is used to set the counter to a specific value** Parameters:  *  counter:  New counter value. ** Return: *  void ********************************************************************************/void QuadDecoder_Cnt16_WriteCounter(uint16 counter) /                                   {    #if(QuadDecoder_Cnt16_UsingFixedFunction)        /* assert if block is already enabled */        CYASSERT (0u == (QuadDecoder_Cnt16_GLOBAL_ENABLE & QuadDecoder_Cnt16_BLOCK_EN_MASK));        /* If block is disabled, enable it and then write the counter */        QuadDecoder_Cnt16_GLOBAL_ENABLE |= QuadDecoder_Cnt16_BLOCK_EN_MASK;        CY_SET_REG16(QuadDecoder_Cnt16_COUNTER_LSB_PTR, (uint16)counter);        QuadDecoder_Cnt16_GLOBAL_ENABLE &= ((uint8)(~QuadDecoder_Cnt16_BLOCK_EN_MASK));    #else        CY_SET_REG16(QuadDecoder_Cnt16_COUNTER_LSB_PTR, counter);    #endif /* (QuadDecoder_Cnt16_UsingFixedFunction) */}
开发者ID:Qmax,项目名称:PT6,代码行数:27,


示例5: Counter_1_WriteCounter

/******************************************************************************** Function Name: Counter_1_WriteCounter********************************************************************************* Summary:*   This funtion is used to set the counter to a specific value** Parameters:  *  counter:  New counter value. ** Return: *  void ********************************************************************************/void Counter_1_WriteCounter(uint16 counter) /                                   {    #if(Counter_1_UsingFixedFunction)        /* assert if block is already enabled */        CYASSERT (0u == (Counter_1_GLOBAL_ENABLE & Counter_1_BLOCK_EN_MASK));        /* If block is disabled, enable it and then write the counter */        Counter_1_GLOBAL_ENABLE |= Counter_1_BLOCK_EN_MASK;        CY_SET_REG16(Counter_1_COUNTER_LSB_PTR, (uint16)counter);        Counter_1_GLOBAL_ENABLE &= ((uint8)(~Counter_1_BLOCK_EN_MASK));    #else        CY_SET_REG16(Counter_1_COUNTER_LSB_PTR, counter);    #endif /* (Counter_1_UsingFixedFunction) */}
开发者ID:scarlso,项目名称:LED_controller,代码行数:27,


示例6: HeartbeatCounter_WritePeriod

/******************************************************************************** Function Name: HeartbeatCounter_WritePeriod********************************************************************************* Summary:* Changes the period of the counter.  The new period * will be loaded the next time terminal count is detected.** Parameters:  *  period: (uint32) A value of 0 will result in*         the counter remaining at zero.  ** Return: *  void********************************************************************************/void HeartbeatCounter_WritePeriod(uint32 period) {    #if(HeartbeatCounter_UsingFixedFunction)        CY_SET_REG16(HeartbeatCounter_PERIOD_LSB_PTR,(uint16)period);    #else        CY_SET_REG32(HeartbeatCounter_PERIOD_LSB_PTR, period);    #endif /* (HeartbeatCounter_UsingFixedFunction) */}
开发者ID:ponioj,项目名称:embedded,代码行数:23,


示例7: ChargeDelay_WriteCompare

    /*******************************************************************************    * Function Name: ChargeDelay_WriteCompare    ********************************************************************************    *    * Summary:    *  This funtion is used to change the compare1 value when the PWM is in Dither    *  mode. The compare output will reflect the new value on the next UDB clock.    *  The compare output will be driven high when the present counter value is    *  compared to the compare value based on the compare mode defined in    *  Dither Mode.    *    * Parameters:    *  compare:  New compare value.    *    * Return:    *  None    *    * Side Effects:    *  This function is only available if the PWM mode parameter is set to    *  Dither Mode, Center Aligned Mode or One Output Mode    *    *******************************************************************************/    void ChargeDelay_WriteCompare(uint8 compare) /                                           {        #if(ChargeDelay_UsingFixedFunction)            CY_SET_REG16(ChargeDelay_COMPARE1_LSB_PTR, (uint16)compare);        #else            CY_SET_REG8(ChargeDelay_COMPARE1_LSB_PTR, compare);        #endif /* (ChargeDelay_UsingFixedFunction) */        #if (ChargeDelay_PWMMode == ChargeDelay__B_PWM__DITHER)            #if(ChargeDelay_UsingFixedFunction)                CY_SET_REG16(ChargeDelay_COMPARE2_LSB_PTR, (uint16)(compare + 1u));            #else                CY_SET_REG8(ChargeDelay_COMPARE2_LSB_PTR, (compare + 1u));            #endif /* (ChargeDelay_UsingFixedFunction) */        #endif /* (ChargeDelay_PWMMode == ChargeDelay__B_PWM__DITHER) */    }
开发者ID:dmaone,项目名称:CommonSense,代码行数:39,


示例8: ChargeDelay_WritePeriod

/******************************************************************************** Function Name: ChargeDelay_WritePeriod********************************************************************************** Summary:*  This function is used to change the period of the counter.  The new period*  will be loaded the next time terminal count is detected.** Parameters:*  period:  Period value. May be between 1 and (2^Resolution)-1.  A value of 0*           will result in the counter remaining at zero.** Return:*  None********************************************************************************/void ChargeDelay_WritePeriod(uint8 period) {    #if(ChargeDelay_UsingFixedFunction)        CY_SET_REG16(ChargeDelay_PERIOD_LSB_PTR, (uint16)period);    #else        CY_SET_REG8(ChargeDelay_PERIOD_LSB_PTR, period);    #endif /* (ChargeDelay_UsingFixedFunction) */}
开发者ID:dmaone,项目名称:CommonSense,代码行数:24,


示例9: hallTickCounter_WritePeriod

/******************************************************************************** Function Name: hallTickCounter_WritePeriod********************************************************************************* Summary:* Changes the period of the counter.  The new period * will be loaded the next time terminal count is detected.** Parameters:  *  period: (uint8) A value of 0 will result in*         the counter remaining at zero.  ** Return: *  void********************************************************************************/void hallTickCounter_WritePeriod(uint8 period) {    #if(hallTickCounter_UsingFixedFunction)        CY_SET_REG16(hallTickCounter_PERIOD_LSB_PTR,(uint16)period);    #else        CY_SET_REG8(hallTickCounter_PERIOD_LSB_PTR, period);    #endif /* (hallTickCounter_UsingFixedFunction) */}
开发者ID:cvb0rg,项目名称:PSoC3_TutorialSeries_PIDcontrol,代码行数:23,


示例10: PWM_WriteCompare2

/******************************************************************************** Function Name: PWM_WriteCompare2********************************************************************************* * Summary:*  This funtion is used to change the compare value, for compare1 output.  *  The compare output will reflect the new value on the next UDB clock.  *  The compare output will be driven high when the present counter value is *  less than or less than or equal to the compare register, depending on the *  mode.** Parameters:  *  compare:  New compare value.  ** Return: *  void** Reentrant:*  Yes********************************************************************************/void PWM_WriteCompare2(uint8 compare) {    #if(PWM_UsingFixedFunction)        CY_SET_REG16(PWM_COMPARE2_LSB_PTR, compare);    #else        CY_SET_REG8(PWM_COMPARE2_LSB_PTR, compare);    #endif}
开发者ID:thurstonzhu,项目名称:ELE302-Carlab,代码行数:29,


示例11: MotorPWM_WritePeriod

/******************************************************************************** Function Name: MotorPWM_WritePeriod********************************************************************************** Summary:*  This function is used to change the period of the counter.  The new period*  will be loaded the next time terminal count is detected.** Parameters:*  period:  Period value. May be between 1 and (2^Resolution)-1.  A value of 0*           will result in the counter remaining at zero.** Return:*  None********************************************************************************/void MotorPWM_WritePeriod(uint8 period) {    #if(MotorPWM_UsingFixedFunction)        CY_SET_REG16(MotorPWM_PERIOD_LSB_PTR, (uint16)period);    #else        CY_SET_REG8(MotorPWM_PERIOD_LSB_PTR, period);    #endif /* (MotorPWM_UsingFixedFunction) */}
开发者ID:eamsuwan93,项目名称:PSoC-4-Compass-Sensor,代码行数:24,


示例12: PWM_3_WritePeriod

/******************************************************************************** Function Name: PWM_3_WritePeriod********************************************************************************** Summary:*  This function is used to change the period of the counter.  The new period*  will be loaded the next time terminal count is detected.** Parameters:*  period:  Period value. May be between 1 and (2^Resolution)-1.  A value of 0*           will result in the counter remaining at zero.** Return:*  None********************************************************************************/void PWM_3_WritePeriod(uint8 period) {    #if(PWM_3_UsingFixedFunction)        CY_SET_REG16(PWM_3_PERIOD_LSB_PTR, (uint16)period);    #else        CY_SET_REG8(PWM_3_PERIOD_LSB_PTR, period);    #endif /* (PWM_3_UsingFixedFunction) */}
开发者ID:CodingBeagle,项目名称:IHA_3_Semester_Project,代码行数:24,


示例13: CsBtns_PWM_WriteCompare

    /*******************************************************************************    * Function Name: CsBtns_PWM_WriteCompare    ********************************************************************************    *    * Summary:    *  This funtion is used to change the compare1 value when the PWM is in Dither    *  mode. The compare output will reflect the new value on the next UDB clock.    *  The compare output will be driven high when the present counter value is    *  compared to the compare value based on the compare mode defined in    *  Dither Mode.    *    * Parameters:    *  compare:  New compare value.    *    * Return:    *  None    *    * Side Effects:    *  This function is only available if the PWM mode parameter is set to    *  Dither Mode, Center Aligned Mode or One Output Mode    *    *******************************************************************************/    void CsBtns_PWM_WriteCompare(uint16 compare) /                                           {        #if(CsBtns_PWM_UsingFixedFunction)            CY_SET_REG16(CsBtns_PWM_COMPARE1_LSB_PTR, (uint16)compare);        #else            CY_SET_REG16(CsBtns_PWM_COMPARE1_LSB_PTR, compare);        #endif /* (CsBtns_PWM_UsingFixedFunction) */        #if (CsBtns_PWM_PWMMode == CsBtns_PWM__B_PWM__DITHER)            #if(CsBtns_PWM_UsingFixedFunction)                CY_SET_REG16(CsBtns_PWM_COMPARE2_LSB_PTR, (uint16)(compare + 1u));            #else                CY_SET_REG16(CsBtns_PWM_COMPARE2_LSB_PTR, (compare + 1u));            #endif /* (CsBtns_PWM_UsingFixedFunction) */        #endif /* (CsBtns_PWM_PWMMode == CsBtns_PWM__B_PWM__DITHER) */    }
开发者ID:jh247247,项目名称:ECE3091-chickybot,代码行数:39,


示例14: Phase_Counter_WritePeriod

/******************************************************************************** Function Name: Phase_Counter_WritePeriod********************************************************************************* Summary:* Changes the period of the counter.  The new period * will be loaded the next time terminal count is detected.** Parameters:  *  period: (uint32) A value of 0 will result in*         the counter remaining at zero.  ** Return: *  void********************************************************************************/void Phase_Counter_WritePeriod(uint32 period) {    #if(Phase_Counter_UsingFixedFunction)        CY_SET_REG16(Phase_Counter_PERIOD_LSB_PTR,(uint16)period);    #else        CY_SET_REG32(Phase_Counter_PERIOD_LSB_PTR, period);    #endif /* (Phase_Counter_UsingFixedFunction) */}
开发者ID:tslator,项目名称:DualBoard-043,代码行数:23,


示例15: pwm_WritePeriod

/******************************************************************************** Function Name: pwm_WritePeriod********************************************************************************** Summary:*  This function is used to change the period of the counter.  The new period*  will be loaded the next time terminal count is detected.** Parameters:*  period:  Period value. May be between 1 and (2^Resolution)-1.  A value of 0*           will result in the counter remaining at zero.** Return:*  None********************************************************************************/void pwm_WritePeriod(uint8 period){#if(pwm_UsingFixedFunction)    CY_SET_REG16(pwm_PERIOD_LSB_PTR, (uint16)period);#else    CY_SET_REG8(pwm_PERIOD_LSB_PTR, period);#endif /* (pwm_UsingFixedFunction) */}
开发者ID:cypresssemiconductorco,项目名称:bleapp,代码行数:24,


示例16: PWM_3_WriteCompare

    /*******************************************************************************    * Function Name: PWM_3_WriteCompare    ********************************************************************************    *    * Summary:    *  This funtion is used to change the compare1 value when the PWM is in Dither    *  mode. The compare output will reflect the new value on the next UDB clock.    *  The compare output will be driven high when the present counter value is    *  compared to the compare value based on the compare mode defined in    *  Dither Mode.    *    * Parameters:    *  compare:  New compare value.    *    * Return:    *  None    *    * Side Effects:    *  This function is only available if the PWM mode parameter is set to    *  Dither Mode, Center Aligned Mode or One Output Mode    *    *******************************************************************************/    void PWM_3_WriteCompare(uint8 compare) /                                           {        #if(PWM_3_UsingFixedFunction)            CY_SET_REG16(PWM_3_COMPARE1_LSB_PTR, (uint16)compare);        #else            CY_SET_REG8(PWM_3_COMPARE1_LSB_PTR, compare);        #endif /* (PWM_3_UsingFixedFunction) */        #if (PWM_3_PWMMode == PWM_3__B_PWM__DITHER)            #if(PWM_3_UsingFixedFunction)                CY_SET_REG16(PWM_3_COMPARE2_LSB_PTR, (uint16)(compare + 1u));            #else                CY_SET_REG8(PWM_3_COMPARE2_LSB_PTR, (compare + 1u));            #endif /* (PWM_3_UsingFixedFunction) */        #endif /* (PWM_3_PWMMode == PWM_3__B_PWM__DITHER) */    }
开发者ID:CodingBeagle,项目名称:IHA_3_Semester_Project,代码行数:39,


示例17: Counter_reset_gen_WritePeriod

/******************************************************************************** Function Name: Counter_reset_gen_WritePeriod********************************************************************************* Summary:* Changes the period of the counter.  The new period * will be loaded the next time terminal count is detected.** Parameters:  *  period: (uint8) A value of 0 will result in*         the counter remaining at zero.  ** Return: *  void********************************************************************************/void Counter_reset_gen_WritePeriod(uint8 period) {    #if(Counter_reset_gen_UsingFixedFunction)        CY_SET_REG16(Counter_reset_gen_PERIOD_LSB_PTR,(uint16)period);    #else        CY_SET_REG8(Counter_reset_gen_PERIOD_LSB_PTR, period);    #endif /* (Counter_reset_gen_UsingFixedFunction) */}
开发者ID:betaEncoder,项目名称:PSoC_WS2812Bdriver,代码行数:23,


示例18: QuadDecoder_Cnt8_WritePeriod

/******************************************************************************** Function Name: QuadDecoder_Cnt8_WritePeriod********************************************************************************* Summary:* Changes the period of the counter.  The new period * will be loaded the next time terminal count is detected.** Parameters:  *  period: (uint8) A value of 0 will result in*         the counter remaining at zero.  ** Return: *  void********************************************************************************/void QuadDecoder_Cnt8_WritePeriod(uint8 period) {    #if(QuadDecoder_Cnt8_UsingFixedFunction)        CY_SET_REG16(QuadDecoder_Cnt8_PERIOD_LSB_PTR,(uint16)period);    #else        CY_SET_REG8(QuadDecoder_Cnt8_PERIOD_LSB_PTR, period);    #endif /* (QuadDecoder_Cnt8_UsingFixedFunction) */}
开发者ID:Qmax,项目名称:PT6,代码行数:23,


示例19: PWM_WriteCounter

/******************************************************************************** Function Name: PWM_WriteCounter********************************************************************************* * Summary:*  This function is used to change the counter value.** Parameters:  *  counter:  This value may be between 1 and (2^Resolution)-1.   ** Return: *  void** Reentrant:*  Yes********************************************************************************/void PWM_WriteCounter(uint8 counter) {    #if(PWM_UsingFixedFunction)        CY_SET_REG16(PWM_COUNTER_LSB_PTR, (uint16)counter);    #else        CY_SET_REG8(PWM_COUNTER_LSB_PTR, counter);    #endif}
开发者ID:thurstonzhu,项目名称:ELE302-Carlab,代码行数:25,


示例20: Phase_Counter_WriteCompare

/******************************************************************************** Function Name: Phase_Counter_WriteCompare********************************************************************************* Summary:* Changes the compare value.  The compare output will * reflect the new value on the next UDB clock.  The compare output will be * driven high when the present counter value compares true based on the * configured compare mode setting. ** Parameters:  *  Compare:  New compare value. ** Return: *  void********************************************************************************/void Phase_Counter_WriteCompare(uint32 compare) /                                   {    #if(Phase_Counter_UsingFixedFunction)        CY_SET_REG16(Phase_Counter_COMPARE_LSB_PTR, (uint16)compare);    #else        CY_SET_REG32(Phase_Counter_COMPARE_LSB_PTR, compare);    #endif /* (Phase_Counter_UsingFixedFunction) */}
开发者ID:tslator,项目名称:DualBoard-043,代码行数:25,


示例21: TIMER_ThreadTimer_WritePeriod

/******************************************************************************** Function Name: TIMER_ThreadTimer_WritePeriod********************************************************************************** Summary:*  This function is used to change the period of the counter.  The new period*  will be loaded the next time terminal count is detected.** Parameters:*  period: This value may be between 1 and (2^Resolution)-1.  A value of 0 will*          result in the counter remaining at zero.** Return:*  void********************************************************************************/void TIMER_ThreadTimer_WritePeriod(uint8 period) {    #if(TIMER_ThreadTimer_UsingFixedFunction)        uint16 period_temp = (uint16)period;        CY_SET_REG16(TIMER_ThreadTimer_PERIOD_LSB_PTR, period_temp);    #else        CY_SET_REG8(TIMER_ThreadTimer_PERIOD_LSB_PTR, period);    #endif /*Write Period value with appropriate resolution suffix depending on UDB or fixed function implementation */}
开发者ID:ipeerbhai,项目名称:FollowMe,代码行数:25,


示例22: AppDelay_WritePeriod

/******************************************************************************** Function Name: AppDelay_WritePeriod********************************************************************************** Summary:*  This function is used to change the period of the counter.  The new period*  will be loaded the next time terminal count is detected.** Parameters:*  period: This value may be between 1 and (2^Resolution)-1.  A value of 0 will*          result in the counter remaining at zero.** Return:*  void********************************************************************************/void AppDelay_WritePeriod(uint32 period) {    #if(AppDelay_UsingFixedFunction)        uint16 period_temp = (uint16)period;        CY_SET_REG16(AppDelay_PERIOD_LSB_PTR, period_temp);    #else        CY_SET_REG24(AppDelay_PERIOD_LSB_PTR, period);    #endif /*Write Period value with appropriate resolution suffix depending on UDB or fixed function implementation */}
开发者ID:andrey-mcs,项目名称:start-finish-system,代码行数:25,


示例23: pwm_WriteCompare2

/******************************************************************************** Function Name: pwm_WriteCompare2********************************************************************************** Summary:*  This funtion is used to change the compare value, for compare1 output.*  The compare output will reflect the new value on the next UDB clock.*  The compare output will be driven high when the present counter value is*  less than or less than or equal to the compare register, depending on the*  mode.** Parameters:*  compare:  New compare value.** Return:*  None********************************************************************************/void pwm_WriteCompare2(uint8 compare) /{#if(pwm_UsingFixedFunction)    CY_SET_REG16(pwm_COMPARE2_LSB_PTR, compare);#else    CY_SET_REG8(pwm_COMPARE2_LSB_PTR, compare);#endif /* (pwm_UsingFixedFunction) */}
开发者ID:cypresssemiconductorco,项目名称:bleapp,代码行数:27,


示例24: HeartbeatCounter_WriteCompare

/******************************************************************************** Function Name: HeartbeatCounter_WriteCompare********************************************************************************* Summary:* Changes the compare value.  The compare output will * reflect the new value on the next UDB clock.  The compare output will be * driven high when the present counter value compares true based on the * configured compare mode setting. ** Parameters:  *  Compare:  New compare value. ** Return: *  void********************************************************************************/void HeartbeatCounter_WriteCompare(uint32 compare) /                                   {    #if(HeartbeatCounter_UsingFixedFunction)        CY_SET_REG16(HeartbeatCounter_COMPARE_LSB_PTR, (uint16)compare);    #else        CY_SET_REG32(HeartbeatCounter_COMPARE_LSB_PTR, compare);    #endif /* (HeartbeatCounter_UsingFixedFunction) */}
开发者ID:ponioj,项目名称:embedded,代码行数:25,


示例25: OSC2_Freq_Timer_1_WritePeriod

/******************************************************************************** Function Name: OSC2_Freq_Timer_1_WritePeriod********************************************************************************** Summary:*  This function is used to change the period of the counter.  The new period*  will be loaded the next time terminal count is detected.** Parameters:*  period: This value may be between 1 and (2^Resolution)-1.  A value of 0 will*          result in the counter remaining at zero.** Return:*  void********************************************************************************/void OSC2_Freq_Timer_1_WritePeriod(uint32 period) {    #if(OSC2_Freq_Timer_1_UsingFixedFunction)        uint16 period_temp = (uint16)period;        CY_SET_REG16(OSC2_Freq_Timer_1_PERIOD_LSB_PTR, period_temp);    #else        CY_SET_REG32(OSC2_Freq_Timer_1_PERIOD_LSB_PTR, period);    #endif /*Write Period value with appropriate resolution suffix depending on UDB or fixed function implementation */}
开发者ID:gillspice,项目名称:Dual-PSoC-DCO,代码行数:25,


示例26: PWM_MOTOR2_WriteCompare2

 /******************************************************************************* * Function Name: PWM_MOTOR2_WriteCompare2 ******************************************************************************** * * Summary: *  This funtion is used to change the compare value, for compare1 output. *  The compare output will reflect the new value on the next UDB clock. *  The compare output will be driven high when the present counter value is *  less than or less than or equal to the compare register, depending on the *  mode. * * Parameters: *  compare:  New compare value. * * Return: *  None * *******************************************************************************/ void PWM_MOTOR2_WriteCompare2(uint8 compare) /                                      {     #if(PWM_MOTOR2_UsingFixedFunction)         CY_SET_REG16(PWM_MOTOR2_COMPARE2_LSB_PTR, compare);     #else         CY_SET_REG8(PWM_MOTOR2_COMPARE2_LSB_PTR, compare);     #endif /* (PWM_MOTOR2_UsingFixedFunction) */ }
开发者ID:mcisek,项目名称:balancing_robot,代码行数:27,


示例27: Counter_reset_gen_WriteCompare

/******************************************************************************** Function Name: Counter_reset_gen_WriteCompare********************************************************************************* Summary:* Changes the compare value.  The compare output will * reflect the new value on the next UDB clock.  The compare output will be * driven high when the present counter value compares true based on the * configured compare mode setting. ** Parameters:  *  Compare:  New compare value. ** Return: *  void********************************************************************************/void Counter_reset_gen_WriteCompare(uint8 compare) /                                   {    #if(Counter_reset_gen_UsingFixedFunction)        CY_SET_REG16(Counter_reset_gen_COMPARE_LSB_PTR, (uint16)compare);    #else        CY_SET_REG8(Counter_reset_gen_COMPARE_LSB_PTR, compare);    #endif /* (Counter_reset_gen_UsingFixedFunction) */}
开发者ID:betaEncoder,项目名称:PSoC_WS2812Bdriver,代码行数:25,


示例28: CyDmaTdSetAddress

/******************************************************************************** Function Name: CyDmaTdSetAddress********************************************************************************** Summary:*  Sets the lower 16 bits of the source and destination addresses for this TD*  only.** Parameters:*  uint8 tdHandle:*   A handle previously returned by CyDmaTdAlloc().**  uint16 source:*   The lower 16 address bits of the source of the data transfer.**  uint16 destination:*   The lower 16 address bits of the destination of the data transfer.** Return:*  CYRET_SUCCESS if successful.*  CYRET_BAD_PARAM if tdHandle is invalid.********************************************************************************/cystatus CyDmaTdSetAddress(uint8 tdHandle, uint16 source, uint16 destination) {    cystatus status = CYRET_BAD_PARAM;    if(tdHandle < CY_DMA_NUMBEROF_TDS)    {        /* Set source address */        reg16 *convert = (reg16 *) &CY_DMA_TDMEM_STRUCT_PTR[tdHandle].TD1[0];        CY_SET_REG16(convert, source);        /* Set destination address */        CY_SET_REG16((reg16 *) &CY_DMA_TDMEM_STRUCT_PTR[tdHandle].TD1[2], destination);        status = CYRET_SUCCESS;    }    return(status);}
开发者ID:Balestrino,项目名称:LSM303D_SPI_PSOC5,代码行数:41,


示例29: PWM_3_WriteCompare1

 /******************************************************************************* * Function Name: PWM_3_WriteCompare1 ******************************************************************************** * * Summary: *  This funtion is used to change the compare1 value.  The compare output will *  reflect the new value on the next UDB clock.  The compare output will be *  driven high when the present counter value is less than or less than or *  equal to the compare register, depending on the mode. * * Parameters: *  compare:  New compare value. * * Return: *  None * *******************************************************************************/ void PWM_3_WriteCompare1(uint8 compare) /                                      {     #if(PWM_3_UsingFixedFunction)         CY_SET_REG16(PWM_3_COMPARE1_LSB_PTR, (uint16)compare);     #else         CY_SET_REG8(PWM_3_COMPARE1_LSB_PTR, compare);     #endif /* (PWM_3_UsingFixedFunction) */ }
开发者ID:CodingBeagle,项目名称:IHA_3_Semester_Project,代码行数:26,


示例30: hallTickCounter_WriteCompare

/******************************************************************************** Function Name: hallTickCounter_WriteCompare********************************************************************************* Summary:* Changes the compare value.  The compare output will * reflect the new value on the next UDB clock.  The compare output will be * driven high when the present counter value compares true based on the * configured compare mode setting. ** Parameters:  *  Compare:  New compare value. ** Return: *  void********************************************************************************/void hallTickCounter_WriteCompare(uint8 compare) /                                   {    #if(hallTickCounter_UsingFixedFunction)        CY_SET_REG16(hallTickCounter_COMPARE_LSB_PTR, (uint16)compare);    #else        CY_SET_REG8(hallTickCounter_COMPARE_LSB_PTR, compare);    #endif /* (hallTickCounter_UsingFixedFunction) */}
开发者ID:cvb0rg,项目名称:PSoC3_TutorialSeries_PIDcontrol,代码行数:25,



注:本文中的CY_SET_REG16函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CY_SET_REG32函数代码示例
C++ CY_GET_REG8函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。