当前位置: 首页 > news >正文

成都企业网站优化关键词 优化 网站

成都企业网站优化,关键词 优化 网站,网络推广是什么工作,淘宝式网站建设目录硬知识Timer_B特点及结构Timer_B寄存器定时器B API处理计时器配置和控制的函数参数处理计时器输出的函数参数管理定时器B中断的函数参数平台#xff1a;Code Composer Studio 10.3.1 MSP430F5529 LaunchPad™ Development Kit (MSP‑EXP430F5529LP) 硬知识 16位定时器B(… 目录硬知识Timer_B特点及结构Timer_B寄存器定时器B API处理计时器配置和控制的函数参数处理计时器输出的函数参数管理定时器B中断的函数参数平台Code Composer Studio 10.3.1 MSP430F5529 LaunchPad™ Development Kit (MSP‑EXP430F5529LP) 硬知识 16位定时器B(Timer_B)和Timer_A一样是MSP430单片机的重要资源。Timer_B往往比Timer_A功能更强大一些MSP430F5529单片机的Timer_B定时器具有7个捕获/比较寄存器。 Timer_B特点及结构 Timer_B定时器具有以下特点  具有4种工作模式和4种可选计数长度的异步16位定时/计数器  参考时钟源可配置  高达7个可配置的捕获/比较寄存器  具有PWM输出能力  具有同步加载能力的双缓冲区比较锁存  具有可对Timer_B中断快速响应的中断向量寄存器。 Timer_B和Timer_A的不同之处列举如下 ① Timer_B计数长度为8位、10位、12位和16位可编程而Timer_A的计数长度固定为16位。 ② Timer_B没有实现Timer_A中的SCCI寄存器位的功能。 ③ Timer_B在比较模式下的捕获/比较寄存器功能与Timer_A的不同增加了比较锁存器。 ④ 有些型号芯片中的Timer_B输出实现了高阻抗输出。 ⑤ 比较模式的原理有所不同。在Timer_A中CCRx寄存器中保存与TAR相比较的数据而在Timer_B中CCRx寄存器中保存的是要比较的数据但并不直接与定时计数器TBR相比较而是将CCRx送到与之相对应的锁存器之后由锁存器与定时计数器TBR相比较。从捕获/比较寄存器向比较锁存器传输数据的时机也是可以编程的可以是在写入捕获/比较寄存器后立即传输也可以由一个定时事件来触发。 ⑥ Timer_B支持多种、同步的定时功能多重的捕获/比较功能和多重的波形输出功能。而且通过对比较数据的两级缓冲可以实现多个PWM信号周期的同步更新。 Timer_B寄存器 Timer_B寄存器列表如表所示基址为03C0h。 定时器B API TIMER_B API被分成三组函数: 处理计时器配置和控制的函数、 处理计时器输出的函数 处理中断处理的函数 处理计时器配置和控制的函数 Timer_B_startCounter(uint16_t baseAddress, uint16_t timerMode) //开启定时器 Timer_B_initUpMode(uint16_t baseAddress, Timer_B_initUpModeParam ∗param) //配置Timer_B为增计数模式 Timer_B_initUpDownMode(uint16_t baseAddress, Timer_B_initUpDownModeParam ∗param) //配置Timer_B为增/减计数模式 Timer_B_initContinuousMode(uint16_t baseAddress, Timer_B_initContinuousModeParam ∗param) //配置Timer_B为连续计数模式 Timer_B_initCaptureMode(uint16_t baseAddress, Timer_B_initCaptureModeParam ∗param) //初始化捕获模式 Timer_B_initCompareMode(uint16_t baseAddress, Timer_B_initCompareModeParam ∗param) //初始化比较模式 Timer_B_clear(uint16_t baseAddress) //重置/清除计时器、时钟分频器计数方向计数。 Timer_B_stop() //停止Timer_B Timer_B_initCompareLatchLoadEvent(uint16_t baseAddress, uint16_t compareRegister, uint16_t compareLatchLoadEvent) //Selects Compare Latch Load Event. Timer_B_selectLatchingGroup(uint16_t baseAddress, uint16_t groupLatch) //Selects Timer_B Latching Group. Timer_B_selectCounterLength(uint16_t baseAddress, uint16_t counterLength) //选择Timer_B计数器长度(位数)参数 baseAddress TIMER_B0_BASEtimerMode TIMER_B_STOP_MODE TIMER_B_UP_MODE TIMER_B_CONTINUOUS_MODE //[Default] TIMER_B_UPDOWN_MODETimer_B_initUpModeParam //***************************************************************************** // //! \brief Used in the Timer_B_initUpMode() function as the param parameter. // //***************************************************************************** typedef struct Timer_B_initUpModeParam {//! Selects the clock source//! \n Valid values are://! - \b TIMER_B_CLOCKSOURCE_EXTERNAL_TXCLK [Default]//! - \b TIMER_B_CLOCKSOURCE_ACLK//! - \b TIMER_B_CLOCKSOURCE_SMCLK//! - \b TIMER_B_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLKuint16_t clockSource;//! Is the divider for Clock source.//! \n Valid values are://! - \b TIMER_B_CLOCKSOURCE_DIVIDER_1 [Default]//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_2//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_3//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_4//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_5//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_6//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_7//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_8//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_10//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_12//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_14//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_16//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_20//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_24//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_28//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_32//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_40//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_48//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_56//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_64uint16_t clockSourceDivider;//! Is the specified Timer_B period. This is the value that gets written//! into the CCR0. Limited to 16 bits[uint16_t]uint16_t timerPeriod;//! Is to enable or disable Timer_B interrupt//! \n Valid values are://! - \b TIMER_B_TBIE_INTERRUPT_ENABLE//! - \b TIMER_B_TBIE_INTERRUPT_DISABLE [Default]uint16_t timerInterruptEnable_TBIE;//! Is to enable or disable Timer_B CCR0 capture compare interrupt.//! \n Valid values are://! - \b TIMER_B_CCIE_CCR0_INTERRUPT_ENABLE//! - \b TIMER_B_CCIE_CCR0_INTERRUPT_DISABLE [Default]uint16_t captureCompareInterruptEnable_CCR0_CCIE;//! Decides if Timer_B clock divider, count direction, count need to be//! reset.//! \n Valid values are://! - \b TIMER_B_DO_CLEAR//! - \b TIMER_B_SKIP_CLEAR [Default]uint16_t timerClear;//! Whether to start the timer immediatelybool startTimer; } Timer_B_initUpModeParam;Timer_B_initUpDownModeParam //***************************************************************************** // //! \brief Used in the Timer_B_initUpDownMode() function as the param //! parameter. // //***************************************************************************** typedef struct Timer_B_initUpDownModeParam {//! Selects the clock source//! \n Valid values are://! - \b TIMER_B_CLOCKSOURCE_EXTERNAL_TXCLK [Default]//! - \b TIMER_B_CLOCKSOURCE_ACLK//! - \b TIMER_B_CLOCKSOURCE_SMCLK//! - \b TIMER_B_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLKuint16_t clockSource;//! Is the divider for Clock source.//! \n Valid values are://! - \b TIMER_B_CLOCKSOURCE_DIVIDER_1 [Default]//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_2//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_3//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_4//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_5//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_6//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_7//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_8//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_10//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_12//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_14//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_16//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_20//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_24//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_28//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_32//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_40//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_48//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_56//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_64uint16_t clockSourceDivider;//! Is the specified Timer_B perioduint16_t timerPeriod;//! Is to enable or disable Timer_B interrupt//! \n Valid values are://! - \b TIMER_B_TBIE_INTERRUPT_ENABLE//! - \b TIMER_B_TBIE_INTERRUPT_DISABLE [Default]uint16_t timerInterruptEnable_TBIE;//! Is to enable or disable Timer_B CCR0 capture compare interrupt.//! \n Valid values are://! - \b TIMER_B_CCIE_CCR0_INTERRUPT_ENABLE//! - \b TIMER_B_CCIE_CCR0_INTERRUPT_DISABLE [Default]uint16_t captureCompareInterruptEnable_CCR0_CCIE;//! Decides if Timer_B clock divider, count direction, count need to be//! reset.//! \n Valid values are://! - \b TIMER_B_DO_CLEAR//! - \b TIMER_B_SKIP_CLEAR [Default]uint16_t timerClear;//! Whether to start the timer immediatelybool startTimer; } Timer_B_initUpDownModeParam;Timer_B_initContinuousModeParam //***************************************************************************** // //! \brief Used in the Timer_B_initContinuousMode() function as the param //! parameter. // //***************************************************************************** typedef struct Timer_B_initContinuousModeParam {//! Selects the clock source//! \n Valid values are://! - \b TIMER_B_CLOCKSOURCE_EXTERNAL_TXCLK [Default]//! - \b TIMER_B_CLOCKSOURCE_ACLK//! - \b TIMER_B_CLOCKSOURCE_SMCLK//! - \b TIMER_B_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLKuint16_t clockSource;//! Is the divider for Clock source.//! \n Valid values are://! - \b TIMER_B_CLOCKSOURCE_DIVIDER_1 [Default]//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_2//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_3//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_4//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_5//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_6//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_7//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_8//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_10//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_12//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_14//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_16//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_20//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_24//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_28//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_32//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_40//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_48//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_56//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_64uint16_t clockSourceDivider;//! Is to enable or disable Timer_B interrupt//! \n Valid values are://! - \b TIMER_B_TBIE_INTERRUPT_ENABLE//! - \b TIMER_B_TBIE_INTERRUPT_DISABLE [Default]uint16_t timerInterruptEnable_TBIE;//! Decides if Timer_B clock divider, count direction, count need to be//! reset.//! \n Valid values are://! - \b TIMER_B_DO_CLEAR//! - \b TIMER_B_SKIP_CLEAR [Default]uint16_t timerClear;//! Whether to start the timer immediatelybool startTimer; } Timer_B_initContinuousModeParam;Timer_B_initCaptureModeParam //***************************************************************************** // //! \brief Used in the Timer_B_initCaptureMode() function as the param //! parameter. // //***************************************************************************** typedef struct Timer_B_initCaptureModeParam {//! Selects the capture register being used. Refer to datasheet to ensure//! the device has the capture register being used.//! \n Valid values are://! - \b TIMER_B_CAPTURECOMPARE_REGISTER_0//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_1//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_2//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_3//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_4//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_5//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_6uint16_t captureRegister;//! Is the capture mode selected.//! \n Valid values are://! - \b TIMER_B_CAPTUREMODE_NO_CAPTURE [Default]//! - \b TIMER_B_CAPTUREMODE_RISING_EDGE//! - \b TIMER_B_CAPTUREMODE_FALLING_EDGE//! - \b TIMER_B_CAPTUREMODE_RISING_AND_FALLING_EDGEuint16_t captureMode;//! Decides the Input Select//! \n Valid values are://! - \b TIMER_B_CAPTURE_INPUTSELECT_CCIxA [Default]//! - \b TIMER_B_CAPTURE_INPUTSELECT_CCIxB//! - \b TIMER_B_CAPTURE_INPUTSELECT_GND//! - \b TIMER_B_CAPTURE_INPUTSELECT_Vccuint16_t captureInputSelect;//! Decides if capture source should be synchronized with Timer_B clock//! \n Valid values are://! - \b TIMER_B_CAPTURE_ASYNCHRONOUS [Default]//! - \b TIMER_B_CAPTURE_SYNCHRONOUSuint16_t synchronizeCaptureSource;//! Is to enable or disable Timer_B capture compare interrupt.//! \n Valid values are://! - \b TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE [Default]//! - \b TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLEuint16_t captureInterruptEnable;//! Specifies the output mode.//! \n Valid values are://! - \b TIMER_B_OUTPUTMODE_OUTBITVALUE [Default]//! - \b TIMER_B_OUTPUTMODE_SET//! - \b TIMER_B_OUTPUTMODE_TOGGLE_RESET//! - \b TIMER_B_OUTPUTMODE_SET_RESET//! - \b TIMER_B_OUTPUTMODE_TOGGLE//! - \b TIMER_B_OUTPUTMODE_RESET//! - \b TIMER_B_OUTPUTMODE_TOGGLE_SET//! - \b TIMER_B_OUTPUTMODE_RESET_SETuint16_t captureOutputMode; } Timer_B_initCaptureModeParam;Timer_B_initCompareModeParam //***************************************************************************** // //! \brief Used in the Timer_B_initCompareMode() function as the param //! parameter. // //***************************************************************************** typedef struct Timer_B_initCompareModeParam {//! Selects the compare register being used. Refer to datasheet to ensure//! the device has the compare register being used.//! \n Valid values are://! - \b TIMER_B_CAPTURECOMPARE_REGISTER_0//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_1//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_2//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_3//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_4//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_5//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_6uint16_t compareRegister;//! Is to enable or disable Timer_B capture compare interrupt.//! \n Valid values are://! - \b TIMER_B_CAPTURECOMPARE_INTERRUPT_DISABLE [Default]//! - \b TIMER_B_CAPTURECOMPARE_INTERRUPT_ENABLEuint16_t compareInterruptEnable;//! Specifies the output mode.//! \n Valid values are://! - \b TIMER_B_OUTPUTMODE_OUTBITVALUE [Default]//! - \b TIMER_B_OUTPUTMODE_SET//! - \b TIMER_B_OUTPUTMODE_TOGGLE_RESET//! - \b TIMER_B_OUTPUTMODE_SET_RESET//! - \b TIMER_B_OUTPUTMODE_TOGGLE//! - \b TIMER_B_OUTPUTMODE_RESET//! - \b TIMER_B_OUTPUTMODE_TOGGLE_SET//! - \b TIMER_B_OUTPUTMODE_RESET_SETuint16_t compareOutputMode;//! Is the count to be compared with in compare modeuint16_t compareValue; } Timer_B_initCompareModeParam;compareRegister /* selects the compare register being used. Refer to datasheet to ensure the device has the compare register being used. Valid values are: */ TIMER_B_CAPTURECOMPARE_REGISTER_0 TIMER_B_CAPTURECOMPARE_REGISTER_1 TIMER_B_CAPTURECOMPARE_REGISTER_2 TIMER_B_CAPTURECOMPARE_REGISTER_3 TIMER_B_CAPTURECOMPARE_REGISTER_4 TIMER_B_CAPTURECOMPARE_REGISTER_5 TIMER_B_CAPTURECOMPARE_REGISTER_6compareLatchLoadEvent /* selects the latch load event Valid values are: */ TIMER_B_LATCH_ON_WRITE_TO_TBxCCRn_COMPARE_REGISTER //[Default] TIMER_B_LATCH_WHEN_COUNTER_COUNTS_TO_0_IN_UP_OR_CONT_MODE TIMER_B_LATCH_WHEN_COUNTER_COUNTS_TO_0_IN_UPDOWN_MODE TIMER_B_LATCH_WHEN_COUNTER_COUNTS_TO_CURRENT_COMPARE_LATCH_VALUEgroupLatch //selects the latching group. Valid values are: TIMER_B_GROUP_NONE //[Default] TIMER_B_GROUP_CL12_CL23_CL56 TIMER_B_GROUP_CL123_CL456 TIMER_B_GROUP_ALLcounterLength //selects the value of counter length. Valid values are: TIMER_B_COUNTER_16BIT //[Default] TIMER_B_COUNTER_12BIT TIMER_B_COUNTER_10BIT TIMER_B_COUNTER_8BIT处理计时器输出的函数 Timer_B_getSynchronizedCaptureCompareInput(uint16_t baseAddress, uint16_t captureCompareRegister, uint16_t synchronized) //获取同步的capturecompare输入 Timer_B_getOutputForOutputModeOutBitValue(uint16_t baseAddress, uint16_t captureCompareRegister) //为输出模式获取输出位 Timer_B_setOutputForOutputModeOutBitValue(uint16_t baseAddress, uint16_t captureCompareRegister, uint16_t outputModeOutBitValue) //为输出模式设置输出位 Timer_B_outputPWM(uint16_t baseAddress, Timer_B_outputPWMParam ∗param) //通过增计数模式产生PWM信号 Timer_B_getCaptureCompareCount(uint16_t baseAddress, uint16_t captureCompareRegister) //获取当前capturecompare计数 Timer_B_setCompareValue(uint16_t baseAddress, uint16_t compareRegister, uint16_t compareValue) //设置捕获比较寄存器的值 Timer_B_getCounterValue(uint16_t baseAddress) //读取当前计时器计数值参数 baseAddress TIMER_B0_BASEcaptureCompareRegister /* selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are: */ TIMER_B_CAPTURECOMPARE_REGISTER_0 TIMER_B_CAPTURECOMPARE_REGISTER_1 TIMER_B_CAPTURECOMPARE_REGISTER_2 TIMER_B_CAPTURECOMPARE_REGISTER_3 TIMER_B_CAPTURECOMPARE_REGISTER_4 TIMER_B_CAPTURECOMPARE_REGISTER_5 TIMER_B_CAPTURECOMPARE_REGISTER_6synchronized //selects the type of capture compare input Valid values are: TIMER_B_READ_SYNCHRONIZED_CAPTURECOMPAREINPUT TIMER_B_READ_CAPTURE_COMPARE_INPUToutputModeOutBitValue //the value to be set for out bit Valid values are: TIMER_B_OUTPUTMODE_OUTBITVALUE_HIGH TIMER_B_OUTPUTMODE_OUTBITVALUE_LOWTimer_B_outputPWMParam //***************************************************************************** // //! \brief Used in the Timer_B_outputPWM() function as the param parameter. // //***************************************************************************** typedef struct Timer_B_outputPWMParam {//! Selects the clock source//! \n Valid values are://! - \b TIMER_B_CLOCKSOURCE_EXTERNAL_TXCLK [Default]//! - \b TIMER_B_CLOCKSOURCE_ACLK//! - \b TIMER_B_CLOCKSOURCE_SMCLK//! - \b TIMER_B_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLKuint16_t clockSource;//! Is the divider for Clock source.//! \n Valid values are://! - \b TIMER_B_CLOCKSOURCE_DIVIDER_1 [Default]//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_2//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_3//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_4//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_5//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_6//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_7//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_8//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_10//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_12//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_14//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_16//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_20//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_24//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_28//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_32//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_40//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_48//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_56//! - \b TIMER_B_CLOCKSOURCE_DIVIDER_64uint16_t clockSourceDivider;//! Selects the desired Timer_B perioduint16_t timerPeriod;//! Selects the compare register being used. Refer to datasheet to ensure//! the device has the compare register being used.//! \n Valid values are://! - \b TIMER_B_CAPTURECOMPARE_REGISTER_0//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_1//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_2//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_3//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_4//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_5//! - \b TIMER_B_CAPTURECOMPARE_REGISTER_6uint16_t compareRegister;//! Specifies the output mode.//! \n Valid values are://! - \b TIMER_B_OUTPUTMODE_OUTBITVALUE [Default]//! - \b TIMER_B_OUTPUTMODE_SET//! - \b TIMER_B_OUTPUTMODE_TOGGLE_RESET//! - \b TIMER_B_OUTPUTMODE_SET_RESET//! - \b TIMER_B_OUTPUTMODE_TOGGLE//! - \b TIMER_B_OUTPUTMODE_RESET//! - \b TIMER_B_OUTPUTMODE_TOGGLE_SET//! - \b TIMER_B_OUTPUTMODE_RESET_SETuint16_t compareOutputMode;//! Specifies the dutycycle for the generated waveformuint16_t dutyCycle; } Timer_B_outputPWMParam;compareRegister //selects the compare register being used. Refer to datasheet to ensure the device has the compare register being used. Valid values are: TIMER_B_CAPTURECOMPARE_REGISTER_0 TIMER_B_CAPTURECOMPARE_REGISTER_1 TIMER_B_CAPTURECOMPARE_REGISTER_2 TIMER_B_CAPTURECOMPARE_REGISTER_3 TIMER_B_CAPTURECOMPARE_REGISTER_4 TIMER_B_CAPTURECOMPARE_REGISTER_5 TIMER_B_CAPTURECOMPARE_REGISTER_6compareValue 比较模式下需要比较的计数值 管理定时器B中断的函数 Timer_B_enableInterrupt(uint16_t baseAddress) //使能定时器B中断 Timer_B_disableInterrupt(uint16_t baseAddress) //禁用定时器B中断 Timer_B_getInterruptStatus(uint16_t baseAddress) //获取定时器B中断状态 Timer_B_enableCaptureCompareInterrupt(uint16_t baseAddress, uint16_t captureCompareRegister) //启用捕获比较中断 Timer_B_disableCaptureCompareInterrupt(uint16_t baseAddress, uint16_t captureCompareRegister) //禁用捕获比较中断 Timer_B_getCaptureCompareInterruptStatus(uint16_t baseAddress, uint16_t captureCompareRegister, uint16_t mask) //清除捕获比较中断标志 Timer_B_clearCaptureCompareInterrupt(uint16_t baseAddress, uint16_t captureCompareRegister) //清除捕获比较中断标志 Timer_B_clearTimerInterrupt(uint16_t baseAddress) //清除Timer_ B TBIFG中断标志。参数 baseAddress TIMER_B0_BASEcaptureCompareRegister /* selects the capture compare register being used. Refer to datasheet to ensure the device has the capture compare register being used. Valid values are: */ TIMER_B_CAPTURECOMPARE_REGISTER_0 TIMER_B_CAPTURECOMPARE_REGISTER_1 TIMER_B_CAPTURECOMPARE_REGISTER_2 TIMER_B_CAPTURECOMPARE_REGISTER_3 TIMER_B_CAPTURECOMPARE_REGISTER_4 TIMER_B_CAPTURECOMPARE_REGISTER_5 TIMER_B_CAPTURECOMPARE_REGISTER_6mask /* is the mask for the interrupt status Mask value is the logical OR of any of the following: */ TIMER_B_CAPTURE_OVERFLOW TIMER_B_CAPTURECOMPARE_INTERRUPT_FLAG
http://www.pierceye.com/news/903328/

相关文章:

  • 华丰建设股份有限公司网站深圳影视广告在哪里好
  • 企业建设网站需要服务器吗谷德设计网官网首页入口
  • 新手学做网站步骤天津制作网站的公司电话
  • 做网站同行php网站开发平台下载
  • 国外风格网站企业宣传片制作公司哪家好
  • 如何做双版网站wordpress 36kr
  • 东莞企石网站设计最新便民信息汇总
  • 浏阳做网站公司做网站app优惠活动的
  • 商务网站开发公司2021网页qq登陆
  • vs 网站开发教程docker 部署wordpress
  • 平面网站设计wordpress数据表更换域名
  • 上海网站设计合理柚v米科技济南网站优化公司电话
  • 卓拙科技做网站吗怎么用php做网站后台程序
  • 山东企业建站系统费用抚宁区建设局网站
  • 免费购物网站程序国外公共空间设计网站
  • 网站 选项卡 图标网站 关键词
  • 怎样在各大网站做有效的宣传抽奖网站怎么做的
  • 建立网站需要多少钱 索 圈湖南岚鸿新开传奇网站合击
  • 快手官方网站音乐人怎么做商城建站系统源码
  • 南充市建设厅官方网站高州做网站
  • 自建网站的优缺点wordpress题库制作
  • 哪家公司做网站毕业设计心理评测网站开发
  • 建设电影网站数据库脚本问答网站如何优化
  • 嘉峪关建设路小学网站游戏网页链接
  • 阿里云 网站根目录广东建筑企业50强
  • 河北省网络科技网站装饰设计素描
  • 合肥网站建设索q479185700企业做网站公司哪家好
  • wordpress暂停网站兰州网站建设方法
  • 丰台网站制作html教程 菜鸟教程
  • 在那个网站做直播好赚钱吗重庆妇科医院排名大全