这篇教程C++ CyExitCriticalSection函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CyExitCriticalSection函数的典型用法代码示例。如果您正苦于以下问题:C++ CyExitCriticalSection函数的具体用法?C++ CyExitCriticalSection怎么用?C++ CyExitCriticalSection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CyExitCriticalSection函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: I2S_DisableRx /******************************************************************************* * Function Name: I2S_DisableRx ******************************************************************************** * * Summary: * Disables the Rx direction of the I2S interface. * * Parameters: * None. * * Return: * None. * *******************************************************************************/ void I2S_DisableRx(void) { uint8 enableInterrupts; I2S_CONTROL_REG &= ((uint8) ~I2S_RX_EN); enableInterrupts = CyEnterCriticalSection(); I2S_RX_STATUS_AUX_CONTROL_REG &= ((uint8) ~I2S_RX_INT_EN); CyExitCriticalSection(enableInterrupts); }
开发者ID:yourskp,项目名称:USB_Audio,代码行数:24,
示例2: UART_SCB_IRQ_SetPriority/******************************************************************************** Function Name: UART_SCB_IRQ_SetPriority********************************************************************************** Summary:* Sets the Priority of the Interrupt. ** Note calling UART_SCB_IRQ_Start or UART_SCB_IRQ_StartEx will * override any effect this API would have had. This API should only be called* after UART_SCB_IRQ_Start or UART_SCB_IRQ_StartEx has been called. * To set the initial priority for the component, use the Design-Wide Resources* Interrupt Editor.** Note This API has no effect on Non-maskable interrupt NMI).** Parameters:* priority: Priority of the interrupt, 0 being the highest priority* PSoC 3 and PSoC 5LP: Priority is from 0 to 7.* PSoC 4: Priority is from 0 to 3.** Return:* None********************************************************************************/void UART_SCB_IRQ_SetPriority(uint8 priority){ uint8 interruptState; uint32 priorityOffset = ((UART_SCB_IRQ__INTC_NUMBER % 4u) * 8u) + 6u; interruptState = CyEnterCriticalSection(); *UART_SCB_IRQ_INTC_PRIOR = (*UART_SCB_IRQ_INTC_PRIOR & (uint32)(~UART_SCB_IRQ__INTC_PRIOR_MASK)) | ((uint32)priority << priorityOffset); CyExitCriticalSection(interruptState);}
开发者ID:linjunhui,项目名称:gateway,代码行数:34,
示例3: I2S_EnableRx /******************************************************************************* * Function Name: I2S_EnableRx ******************************************************************************** * * Summary: * Enables the Rx direction of the I2S interface. At the next word * select falling edge reception of data will begin. * * Parameters: * None. * * Return: * None. * *******************************************************************************/ void I2S_EnableRx(void) { uint8 enableInterrupts; I2S_CONTROL_REG |= I2S_RX_EN; enableInterrupts = CyEnterCriticalSection(); I2S_RX_STATUS_AUX_CONTROL_REG |= I2S_RX_INT_EN; CyExitCriticalSection(enableInterrupts); }
开发者ID:yourskp,项目名称:USB_Audio,代码行数:25,
示例4: isr_Rx_1_SetPriority/******************************************************************************** Function Name: isr_Rx_1_SetPriority********************************************************************************** Summary:* Sets the Priority of the Interrupt. ** Note calling isr_Rx_1_Start or isr_Rx_1_StartEx will * override any effect this API would have had. This API should only be called* after isr_Rx_1_Start or isr_Rx_1_StartEx has been called. * To set the initial priority for the component, use the Design-Wide Resources* Interrupt Editor.** Note This API has no effect on Non-maskable interrupt NMI).** Parameters:* priority: Priority of the interrupt, 0 being the highest priority* PSoC 3 and PSoC 5LP: Priority is from 0 to 7.* PSoC 4: Priority is from 0 to 3.** Return:* None********************************************************************************/void isr_Rx_1_SetPriority(uint8 priority){ uint8 interruptState; uint32 priorityOffset = ((isr_Rx_1__INTC_NUMBER % 4u) * 8u) + 6u; interruptState = CyEnterCriticalSection(); *isr_Rx_1_INTC_PRIOR = (*isr_Rx_1_INTC_PRIOR & (uint32)(~isr_Rx_1__INTC_PRIOR_MASK)) | ((uint32)priority << priorityOffset); CyExitCriticalSection(interruptState);}
开发者ID:arbesfeld,项目名称:BoxesUART,代码行数:34,
示例5: I2S_Enable/******************************************************************************** Function Name: I2S_Enable********************************************************************************** Summary:* Enables I2S interface.** Parameters:* None.** Return:* None.********************************************************************************/void I2S_Enable(void) { uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); I2S_AUX_CONTROL_REG |= I2S_CNTR7_EN; CyExitCriticalSection(enableInterrupts); I2S_CONTROL_REG |= I2S_EN;}
开发者ID:yourskp,项目名称:USB_Audio,代码行数:24,
示例6: start_int_SetPriority/******************************************************************************** Function Name: start_int_SetPriority********************************************************************************** Summary:* Sets the Priority of the Interrupt. ** Note calling start_int_Start or start_int_StartEx will * override any effect this API would have had. This API should only be called* after start_int_Start or start_int_StartEx has been called. * To set the initial priority for the component, use the Design-Wide Resources* Interrupt Editor.** Note This API has no effect on Non-maskable interrupt NMI).** Parameters:* priority: Priority of the interrupt, 0 being the highest priority* PSoC 3 and PSoC 5LP: Priority is from 0 to 7.* PSoC 4: Priority is from 0 to 3.** Return:* None********************************************************************************/void start_int_SetPriority(uint8 priority){ uint8 interruptState; uint32 priorityOffset = ((start_int__INTC_NUMBER % 4u) * 8u) + 6u; interruptState = CyEnterCriticalSection(); *start_int_INTC_PRIOR = (*start_int_INTC_PRIOR & (uint32)(~start_int__INTC_PRIOR_MASK)) | ((uint32)priority << priorityOffset); CyExitCriticalSection(interruptState);}
开发者ID:andrey-mcs,项目名称:start-finish-system,代码行数:34,
示例7: Filter_Reset_ISR_SetPriority/******************************************************************************** Function Name: Filter_Reset_ISR_SetPriority********************************************************************************** Summary:* Sets the Priority of the Interrupt. ** Note calling Filter_Reset_ISR_Start or Filter_Reset_ISR_StartEx will * override any effect this API would have had. This API should only be called* after Filter_Reset_ISR_Start or Filter_Reset_ISR_StartEx has been called. * To set the initial priority for the component, use the Design-Wide Resources* Interrupt Editor.** Note This API has no effect on Non-maskable interrupt NMI).** Parameters:* priority: Priority of the interrupt, 0 being the highest priority* PSoC 3 and PSoC 5LP: Priority is from 0 to 7.* PSoC 4: Priority is from 0 to 3.** Return:* None********************************************************************************/void Filter_Reset_ISR_SetPriority(uint8 priority){ uint8 interruptState; uint32 priorityOffset = ((Filter_Reset_ISR__INTC_NUMBER % 4u) * 8u) + 6u; interruptState = CyEnterCriticalSection(); *Filter_Reset_ISR_INTC_PRIOR = (*Filter_Reset_ISR_INTC_PRIOR & (uint32)(~Filter_Reset_ISR__INTC_PRIOR_MASK)) | ((uint32)priority << priorityOffset); CyExitCriticalSection(interruptState);}
开发者ID:Adrast,项目名称:16gr4404,代码行数:34,
示例8: Count7_Stop/******************************************************************************** Function Name: Count7_Stop********************************************************************************** Summary:* Disables the software enable of the counter.** Parameters:* None** Return:* None********************************************************************************/void Count7_Stop(void) { uint8 interruptState; interruptState = CyEnterCriticalSection(); /* Clear the counter start bit in auxiliary control. */ Count7_AUX_CONTROL_REG &= (uint8) ~((uint8) Count7_COUNTER_START); CyExitCriticalSection(interruptState);}
开发者ID:Ardelean-Calin,项目名称:Benchtop-Power-Supply,代码行数:24,
示例9: BLE_1_bless_isr_SetPriority/******************************************************************************** Function Name: BLE_1_bless_isr_SetPriority********************************************************************************** Summary:* Sets the Priority of the Interrupt. ** Note calling BLE_1_bless_isr_Start or BLE_1_bless_isr_StartEx will * override any effect this API would have had. This API should only be called* after BLE_1_bless_isr_Start or BLE_1_bless_isr_StartEx has been called. * To set the initial priority for the component, use the Design-Wide Resources* Interrupt Editor.** Note This API has no effect on Non-maskable interrupt NMI).** Parameters:* priority: Priority of the interrupt, 0 being the highest priority* PSoC 3 and PSoC 5LP: Priority is from 0 to 7.* PSoC 4: Priority is from 0 to 3.** Return:* None********************************************************************************/void BLE_1_bless_isr_SetPriority(uint8 priority){ uint8 interruptState; uint32 priorityOffset = ((BLE_1_bless_isr__INTC_NUMBER % 4u) * 8u) + 6u; interruptState = CyEnterCriticalSection(); *BLE_1_bless_isr_INTC_PRIOR = (*BLE_1_bless_isr_INTC_PRIOR & (uint32)(~BLE_1_bless_isr__INTC_PRIOR_MASK)) | ((uint32)priority << priorityOffset); CyExitCriticalSection(interruptState);}
开发者ID:VivienZeng,项目名称:ECE9047_Group11_Lab-2,代码行数:34,
示例10: XBEE_RX_INT_SetPriority/******************************************************************************** Function Name: XBEE_RX_INT_SetPriority********************************************************************************** Summary:* Sets the Priority of the Interrupt. ** Note calling XBEE_RX_INT_Start or XBEE_RX_INT_StartEx will * override any effect this API would have had. This API should only be called* after XBEE_RX_INT_Start or XBEE_RX_INT_StartEx has been called. * To set the initial priority for the component, use the Design-Wide Resources* Interrupt Editor.** Note This API has no effect on Non-maskable interrupt NMI).** Parameters:* priority: Priority of the interrupt, 0 being the highest priority* PSoC 3 and PSoC 5LP: Priority is from 0 to 7.* PSoC 4: Priority is from 0 to 3.** Return:* None********************************************************************************/void XBEE_RX_INT_SetPriority(uint8 priority){ uint8 interruptState; uint32 priorityOffset = ((XBEE_RX_INT__INTC_NUMBER % 4u) * 8u) + 6u; interruptState = CyEnterCriticalSection(); *XBEE_RX_INT_INTC_PRIOR = (*XBEE_RX_INT_INTC_PRIOR & (uint32)(~XBEE_RX_INT__INTC_PRIOR_MASK)) | ((uint32)priority << priorityOffset); CyExitCriticalSection(interruptState);}
开发者ID:pablobacho,项目名称:XBee-PSoC,代码行数:34,
示例11: Tuner_RunTunervoid Tuner_RunTuner(void){ uint8 interruptState; uint8 suspended = 0; uint16 command; uint16 previousCompleteBit; /* COMPLETE_BIT in tunerCmd at time of last send to tuner host */ Tuner_SendBuffer(); /* Handle suspend command to avoid deadlock later in CapSense_RunTuner */ do { Tuner_RefreshBuffer(); interruptState = CyEnterCriticalSection(); /* Avoid ints between read and modify tunerCmd */ command = CapSense_dsRam.tunerCmd; switch (command) { case CapSense_TU_CMD_SUSPEND_E: suspended = 1; CapSense_dsRam.tunerCmd |= CapSense_TU_CMD_COMPLETE_BIT; CyExitCriticalSection(interruptState); /* Enable ints during SendBuffer */ Tuner_SendBuffer(); /* Send buffer with updated COMPLETE_BIT to tuner host */ interruptState = CyEnterCriticalSection(); break; case CapSense_TU_CMD_RESUME_E: case CapSense_TU_CMD_RESTART_E: case CapSense_TU_CMD_RUN_SNR_TEST_E: suspended = 0; break; default: break; } CyExitCriticalSection(interruptState); } while (suspended); previousCompleteBit = CapSense_dsRam.tunerCmd & CapSense_TU_CMD_COMPLETE_BIT; CapSense_RunTuner(); if ( previousCompleteBit != (CapSense_dsRam.tunerCmd & CapSense_TU_CMD_COMPLETE_BIT) ) Tuner_SendBuffer(); /* Send buffer with updated COMPLETE_BIT to tuner host */}
开发者ID:hakanjansson,项目名称:psoc_nuggets,代码行数:43,
示例12: TimerDelay_Interrupt_SetPriority/******************************************************************************** Function Name: TimerDelay_Interrupt_SetPriority********************************************************************************** Summary:* Sets the Priority of the Interrupt. ** Note calling TimerDelay_Interrupt_Start or TimerDelay_Interrupt_StartEx will * override any effect this API would have had. This API should only be called* after TimerDelay_Interrupt_Start or TimerDelay_Interrupt_StartEx has been called. * To set the initial priority for the component, use the Design-Wide Resources* Interrupt Editor.** Note This API has no effect on Non-maskable interrupt NMI).** Parameters:* priority: Priority of the interrupt, 0 being the highest priority* PSoC 3 and PSoC 5LP: Priority is from 0 to 7.* PSoC 4: Priority is from 0 to 3.** Return:* None********************************************************************************/void TimerDelay_Interrupt_SetPriority(uint8 priority){ uint8 interruptState; uint32 priorityOffset = ((TimerDelay_Interrupt__INTC_NUMBER % 4u) * 8u) + 6u; interruptState = CyEnterCriticalSection(); *TimerDelay_Interrupt_INTC_PRIOR = (*TimerDelay_Interrupt_INTC_PRIOR & (uint32)(~TimerDelay_Interrupt__INTC_PRIOR_MASK)) | ((uint32)priority << priorityOffset); CyExitCriticalSection(interruptState);}
开发者ID:Burn2539,项目名称:CoRo_PW_PSOC,代码行数:34,
示例13: mainint main(){ uint8 interruptState; CyGlobalIntEnable; /* Enable global interrupts */ EZI2C_Start(); /* Start EZI2C component */ /* * Set up communication and initialize data buffer to CapSense data structure * to use Tuner application */ EZI2C_EzI2CSetBuffer1(sizeof(CapSense_dsRam), sizeof(CapSense_dsRam), (uint8 *)&CapSense_dsRam); CapSense_Start(); /* Initialize component */ BleHandler_Init(); Tuner_Init(BleHandler_RefreshBuffer, BleHandler_SendBuffer); CapSense_ScanAllWidgets(); /* Scan all widgets */ for(;;) { /* Do this only when a scan is done */ interruptState = CyEnterCriticalSection(); if(CapSense_NOT_BUSY == CapSense_IsBusy()) { CyExitCriticalSection(interruptState); CapSense_ProcessAllWidgets(); /* Process all widgets */ Tuner_RunTuner(); if (CapSense_IsAnyWidgetActive()) /* Scan result verification */ { /* add custom tasks to execute when touch detected */ } CapSense_ScanAllWidgets(); /* Start next scan */ } CySysPmSleep(); /* Sleep until scan is finished */ CyExitCriticalSection(interruptState); }}
开发者ID:hakanjansson,项目名称:psoc_nuggets,代码行数:42,
示例14: TILT_SetCounterMode/******************************************************************************** Function Name: TILT_SetCounterMode********************************************************************************** Summary:* Sets the counter mode. Applicable to all modes except Quadrature Decoder* and PWM with pseudo random output.** Parameters:* counterMode: Enumerated couner type values* Values:* - TILT_COUNT_UP - Counts up* - TILT_COUNT_DOWN - Counts down* - TILT_COUNT_UPDOWN0 - Counts up and down. Terminal count* generated when counter reaches 0* - TILT_COUNT_UPDOWN1 - Counts up and down. Terminal count* generated both when counter reaches 0* and period** Return:* None********************************************************************************/void TILT_SetCounterMode(uint32 counterMode){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); TILT_CONTROL_REG &= (uint32)~TILT_UPDOWN_MASK; TILT_CONTROL_REG |= counterMode; CyExitCriticalSection(enableInterrupts);}
开发者ID:Rensselaer-Motorsport,项目名称:E-Throttle,代码行数:34,
示例15: TILT_SetCompareSwap/******************************************************************************** Function Name: TILT_SetCompareSwap********************************************************************************** Summary:* Writes the register that controls whether the compare registers are* swapped. When enabled in Timer/Counter mode(without capture) the swap occurs* at a TC event. In PWM mode the swap occurs at the next TC event following* a hardware switch event.** Parameters:* swapEnable* Values:* - 0 - Disable swap* - 1 - Enable swap** Return:* None********************************************************************************/void TILT_SetCompareSwap(uint32 swapEnable){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); TILT_CONTROL_REG &= (uint32)~TILT_RELOAD_CC_MASK; TILT_CONTROL_REG |= (swapEnable & TILT_1BIT_MASK); CyExitCriticalSection(enableInterrupts);}
开发者ID:Rensselaer-Motorsport,项目名称:E-Throttle,代码行数:31,
示例16: TILT_SetPWMInvert/******************************************************************************** Function Name: TILT_SetPWMInvert********************************************************************************** Summary:* Writes the bits that control whether the line and line_n outputs are* inverted from their normal output values. This functionality is only* applicable to the three PWM modes.** Parameters:* mask: Mask of outputs to invert.* Values:* - TILT_INVERT_LINE - Inverts the line output* - TILT_INVERT_LINE_N - Inverts the line_n output** Return:* None********************************************************************************/void TILT_SetPWMInvert(uint32 mask){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); TILT_CONTROL_REG &= (uint32)~TILT_INV_OUT_MASK; TILT_CONTROL_REG |= mask; CyExitCriticalSection(enableInterrupts);}
开发者ID:Rensselaer-Motorsport,项目名称:E-Throttle,代码行数:30,
示例17: TILT_SetPrescaler/******************************************************************************** Function Name: TILT_SetPrescaler********************************************************************************** Summary:* Sets the prescaler value that is applied to the clock input. Not applicable* to PWM with dead time mode or Quadrature Decoder mode.** Parameters:* prescaler: Prescaler divider value* Values:* - TILT_PRESCALE_DIVBY1 - Divide by 1 (no prescaling)* - TILT_PRESCALE_DIVBY2 - Divide by 2* - TILT_PRESCALE_DIVBY4 - Divide by 4* - TILT_PRESCALE_DIVBY8 - Divide by 8* - TILT_PRESCALE_DIVBY16 - Divide by 16* - TILT_PRESCALE_DIVBY32 - Divide by 32* - TILT_PRESCALE_DIVBY64 - Divide by 64* - TILT_PRESCALE_DIVBY128 - Divide by 128** Return:* None********************************************************************************/void TILT_SetPrescaler(uint32 prescaler){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); TILT_CONTROL_REG &= (uint32)~TILT_PRESCALER_MASK; TILT_CONTROL_REG |= prescaler; CyExitCriticalSection(enableInterrupts);}
开发者ID:Rensselaer-Motorsport,项目名称:E-Throttle,代码行数:35,
示例18: TILT_SetCaptureMode/******************************************************************************** Function Name: TILT_SetCaptureMode********************************************************************************** Summary:* Sets the capture trigger mode. For PWM mode this is the switch input.* This input is not applicable to the Timer/Counter without Capture and* Quadrature Decoder modes.** Parameters:* triggerMode: Enumerated trigger mode value* Values:* - TILT_TRIG_LEVEL - Level* - TILT_TRIG_RISING - Rising edge* - TILT_TRIG_FALLING - Falling edge* - TILT_TRIG_BOTH - Both rising and falling edge** Return:* None********************************************************************************/void TILT_SetCaptureMode(uint32 triggerMode){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); TILT_TRIG_CONTROL1_REG &= (uint32)~TILT_CAPTURE_MASK; TILT_TRIG_CONTROL1_REG |= triggerMode; CyExitCriticalSection(enableInterrupts);}
开发者ID:Rensselaer-Motorsport,项目名称:E-Throttle,代码行数:32,
示例19: CySpcStart/******************************************************************************** Function Name: CySpcStart********************************************************************************* Summary:* Starts the SPC.** Parameters:* None** Return:* None********************************************************************************/void CySpcStart(void) { /* Save current global interrupt enable and disable it */ uint8 interruptState = CyEnterCriticalSection(); CY_SPC_PM_ACT_REG |= PM_SPC_PM_EN; CY_SPC_PM_STBY_REG |= PM_SPC_PM_EN; /* Restore global interrupt enable state */ CyExitCriticalSection(interruptState);}
开发者ID:TheCbac,项目名称:OV5620,代码行数:24,
示例20: Backlight_PWM_SetQDMode/******************************************************************************** Function Name: Backlight_PWM_SetQDMode********************************************************************************** Summary:* Sets the the Quadrature Decoder to one of 3 supported modes.* Is functionality is only applicable to Quadrature Decoder operation.** Parameters:* qdMode: Quadrature Decoder mode* Values:* - Backlight_PWM_MODE_X1 - Counts on phi 1 rising* - Backlight_PWM_MODE_X2 - Counts on both edges of phi1 (2x faster)* - Backlight_PWM_MODE_X4 - Counts on both edges of phi1 and phi2* (4x faster)** Return:* None********************************************************************************/void Backlight_PWM_SetQDMode(uint32 qdMode){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); Backlight_PWM_CONTROL_REG &= (uint32)~Backlight_PWM_QUAD_MODE_MASK; Backlight_PWM_CONTROL_REG |= qdMode; CyExitCriticalSection(enableInterrupts);}
开发者ID:777string,项目名称:reload-pro,代码行数:31,
示例21: Backlight_PWM_SetCountMode/******************************************************************************** Function Name: Backlight_PWM_SetCountMode********************************************************************************** Summary:* Sets the count trigger mode. For Quadrature Decoder mode this is the phiA* input.** Parameters:* triggerMode: Enumerated trigger mode value* Values:* - Backlight_PWM_TRIG_LEVEL - Level* - Backlight_PWM_TRIG_RISING - Rising edge* - Backlight_PWM_TRIG_FALLING - Falling edge* - Backlight_PWM_TRIG_BOTH - Both rising and falling edge** Return:* None********************************************************************************/void Backlight_PWM_SetCountMode(uint32 triggerMode){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); Backlight_PWM_TRIG_CONTROL1_REG &= (uint32)~Backlight_PWM_COUNT_MASK; Backlight_PWM_TRIG_CONTROL1_REG |= ((uint32)(triggerMode << Backlight_PWM_COUNT_SHIFT)); CyExitCriticalSection(enableInterrupts);}
开发者ID:777string,项目名称:reload-pro,代码行数:31,
示例22: Backlight_PWM_SetPWMInvert/******************************************************************************** Function Name: Backlight_PWM_SetPWMInvert********************************************************************************** Summary:* Writes the bits that control whether the line and line_n outputs are* inverted from their normal output values. This functionality is only* applicable to the three PWM modes.** Parameters:* mask: Mask of outputs to invert.* Values:* - Backlight_PWM_INVERT_LINE - Inverts the line output* - Backlight_PWM_INVERT_LINE_N - Inverts the line_n output** Return:* None********************************************************************************/void Backlight_PWM_SetPWMInvert(uint32 mask){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); Backlight_PWM_CONTROL_REG &= (uint32)~Backlight_PWM_INV_OUT_MASK; Backlight_PWM_CONTROL_REG |= mask; CyExitCriticalSection(enableInterrupts);}
开发者ID:777string,项目名称:reload-pro,代码行数:30,
示例23: Backlight_PWM_SetPrescaler/******************************************************************************** Function Name: Backlight_PWM_SetPrescaler********************************************************************************** Summary:* Sets the prescaler value that is applied to the clock input. Not applicable* to PWM with dead time mode or Quadrature Decoder mode.** Parameters:* prescaler: Prescaler divider value* Values:* - Backlight_PWM_PRESCALE_DIVBY1 - Divide by 1 (no prescaling)* - Backlight_PWM_PRESCALE_DIVBY2 - Divide by 2* - Backlight_PWM_PRESCALE_DIVBY4 - Divide by 4* - Backlight_PWM_PRESCALE_DIVBY8 - Divide by 8* - Backlight_PWM_PRESCALE_DIVBY16 - Divide by 16* - Backlight_PWM_PRESCALE_DIVBY32 - Divide by 32* - Backlight_PWM_PRESCALE_DIVBY64 - Divide by 64* - Backlight_PWM_PRESCALE_DIVBY128 - Divide by 128** Return:* None********************************************************************************/void Backlight_PWM_SetPrescaler(uint32 prescaler){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); Backlight_PWM_CONTROL_REG &= (uint32)~Backlight_PWM_PRESCALER_MASK; Backlight_PWM_CONTROL_REG |= prescaler; CyExitCriticalSection(enableInterrupts);}
开发者ID:777string,项目名称:reload-pro,代码行数:35,
示例24: Backlight_PWM_SetCompareSwap/******************************************************************************** Function Name: Backlight_PWM_SetCompareSwap********************************************************************************** Summary:* Writes the register that controls whether the compare registers are* swapped. When enabled in Timer/Counter mode(without capture) the swap occurs* at a TC event. In PWM mode the swap occurs at the next TC event following* a hardware switch event.** Parameters:* swapEnable* Values:* - 0 - Disable swap* - 1 - Enable swap** Return:* None********************************************************************************/void Backlight_PWM_SetCompareSwap(uint32 swapEnable){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); Backlight_PWM_CONTROL_REG &= (uint32)~Backlight_PWM_RELOAD_CC_MASK; Backlight_PWM_CONTROL_REG |= (swapEnable & Backlight_PWM_1BIT_MASK); CyExitCriticalSection(enableInterrupts);}
开发者ID:777string,项目名称:reload-pro,代码行数:31,
示例25: Backlight_PWM_SetCounterMode/******************************************************************************** Function Name: Backlight_PWM_SetCounterMode********************************************************************************** Summary:* Sets the counter mode. Applicable to all modes except Quadrature Decoder* and PWM with pseudo random output.** Parameters:* counterMode: Enumerated couner type values* Values:* - Backlight_PWM_COUNT_UP - Counts up* - Backlight_PWM_COUNT_DOWN - Counts down* - Backlight_PWM_COUNT_UPDOWN0 - Counts up and down. Terminal count* generated when counter reaches 0* - Backlight_PWM_COUNT_UPDOWN1 - Counts up and down. Terminal count* generated both when counter reaches 0* and period** Return:* None********************************************************************************/void Backlight_PWM_SetCounterMode(uint32 counterMode){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); Backlight_PWM_CONTROL_REG &= (uint32)~Backlight_PWM_UPDOWN_MASK; Backlight_PWM_CONTROL_REG |= counterMode; CyExitCriticalSection(enableInterrupts);}
开发者ID:777string,项目名称:reload-pro,代码行数:34,
示例26: CyEEPROM_Stop/******************************************************************************** Function Name: CyEEPROM_Stop********************************************************************************** Summary:* Disable the EEPROM.** Parameters:* None** Return:* None********************************************************************************/void CyEEPROM_Stop (void) { uint8 interruptState; interruptState = CyEnterCriticalSection(); CY_FLASH_PM_ACT_CFG12_REG &= ((uint8)(~CY_FLASH_PM_ACT_CFG12_EN_EE)); CY_FLASH_PM_ALTACT_CFG12_REG &= ((uint8)(~CY_FLASH_PM_ALTACT_CFG12_EN_EE)); CyExitCriticalSection(interruptState);}
开发者ID:ElectroTiger,项目名称:ELE398,代码行数:25,
示例27: Backlight_PWM_SetCaptureMode/******************************************************************************** Function Name: Backlight_PWM_SetCaptureMode********************************************************************************** Summary:* Sets the capture trigger mode. For PWM mode this is the switch input.* This input is not applicable to the Timer/Counter without Capture and* Quadrature Decoder modes.** Parameters:* triggerMode: Enumerated trigger mode value* Values:* - Backlight_PWM_TRIG_LEVEL - Level* - Backlight_PWM_TRIG_RISING - Rising edge* - Backlight_PWM_TRIG_FALLING - Falling edge* - Backlight_PWM_TRIG_BOTH - Both rising and falling edge** Return:* None********************************************************************************/void Backlight_PWM_SetCaptureMode(uint32 triggerMode){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); Backlight_PWM_TRIG_CONTROL1_REG &= (uint32)~Backlight_PWM_CAPTURE_MASK; Backlight_PWM_TRIG_CONTROL1_REG |= triggerMode; CyExitCriticalSection(enableInterrupts);}
开发者ID:777string,项目名称:reload-pro,代码行数:32,
示例28: TILT_SetCountMode/******************************************************************************** Function Name: TILT_SetCountMode********************************************************************************** Summary:* Sets the count trigger mode. For Quadrature Decoder mode this is the phiA* input.** Parameters:* triggerMode: Enumerated trigger mode value* Values:* - TILT_TRIG_LEVEL - Level* - TILT_TRIG_RISING - Rising edge* - TILT_TRIG_FALLING - Falling edge* - TILT_TRIG_BOTH - Both rising and falling edge** Return:* None********************************************************************************/void TILT_SetCountMode(uint32 triggerMode){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); TILT_TRIG_CONTROL1_REG &= (uint32)~TILT_COUNT_MASK; TILT_TRIG_CONTROL1_REG |= ((uint32)(triggerMode << TILT_COUNT_SHIFT)); CyExitCriticalSection(enableInterrupts);}
开发者ID:Rensselaer-Motorsport,项目名称:E-Throttle,代码行数:31,
示例29: TILT_SetQDMode/******************************************************************************** Function Name: TILT_SetQDMode********************************************************************************** Summary:* Sets the the Quadrature Decoder to one of 3 supported modes.* Is functionality is only applicable to Quadrature Decoder operation.** Parameters:* qdMode: Quadrature Decoder mode* Values:* - TILT_MODE_X1 - Counts on phi 1 rising* - TILT_MODE_X2 - Counts on both edges of phi1 (2x faster)* - TILT_MODE_X4 - Counts on both edges of phi1 and phi2* (4x faster)** Return:* None********************************************************************************/void TILT_SetQDMode(uint32 qdMode){ uint8 enableInterrupts; enableInterrupts = CyEnterCriticalSection(); TILT_CONTROL_REG &= (uint32)~TILT_QUAD_MODE_MASK; TILT_CONTROL_REG |= qdMode; CyExitCriticalSection(enableInterrupts);}
开发者ID:Rensselaer-Motorsport,项目名称:E-Throttle,代码行数:31,
示例30: CySysPmSetWakeupPolarity /******************************************************************************* * Function Name: CySysPmSetWakeupPolarity ******************************************************************************** * * Summary: * Wake up from the stop mode is performed by toggling the wakeup pin, * causing a normal boot procedure to occur. This function assigns * the wakeup pin active level. Setting the wakeup pin to this level will cause * the wakeup from stop mode. The wakeup pin is active low by default. * * Parameters: * polarity: Wakeup pin active level: * Value Define Level * 0 CY_PM_STOP_WAKEUP_ACTIVE_LOW Logical zero will wakeup the chip * 1 CY_PM_STOP_WAKEUP_ACTIVE_HIGH Logical one will wakeup the chip * * Return: * None * *******************************************************************************/ void CySysPmSetWakeupPolarity(uint32 polarity) { uint8 interruptState; interruptState = CyEnterCriticalSection(); CY_PM_PWR_STOP_REG = (CY_PM_STOP_WAKEUP_ACTIVE_LOW != polarity) ? (CY_PM_PWR_STOP_REG | CY_PM_PWR_STOP_POLARITY) : (CY_PM_PWR_STOP_REG & (uint32) (~CY_PM_PWR_STOP_POLARITY)); CyExitCriticalSection(interruptState); }
开发者ID:Adrast,项目名称:16gr4404,代码行数:32,
注:本文中的CyExitCriticalSection函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CyIntDisable函数代码示例 C++ CyEnterCriticalSection函数代码示例 |