⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csl_tmraux.h

📁 ccs下对dm6446的测试程序
💻 H
📖 第 1 页 / 共 3 页
字号:
 *//** ============================================================================ *   @n@b CSL_TmrLoadPrd12 * *   @b Description *      Loads the General purpose timer period register 12 * *   @b Arguments *   @verbatim        hTmr            Handle to the Gptimer instance        loadVal         Value to be loaded to the Gptimer period register12     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to timer mode * *   <b> Post Condition </b> *   @n  Gptimer period register is loaded with the given value. * * *   @b Modifies *   @n Gptimer period register12 * *   @b Example *   @verbatim        CSL_TmrHandle     hTmr;        Uint32           *loadVal;        ...        CSL_TmrLoadPrd12 (hWdt, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrLoadPrd12 (    CSL_TmrHandle        hTmr,    Uint32              *loadVal){    hTmr->regs->PRD12 = *(loadVal);}/** ============================================================================ *   @n@b CSL_TmrLoadPrd34 * *   @b Description *      Loads the General purpose timer period register 34 * *   @b Arguments *   @verbatim        hTmr            Handle to the GPtimer instance        loadVal         Value to be loaded to the Gptimer period register34     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to timer mode * *   <b> Post Condition </b> *   @n  Gptimer period register is loaded with the given value. * * *   @b Modifies *   @n Gptimer period register34 * *   @b Example *   @verbatim        CSL_TmrHandle      hTmr;        Uint32            *loadVal;        ...        CSL_TmrLoadPrd34 (hWdt, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrLoadPrd34 (    CSL_TmrHandle        hTmr,    Uint32              *loadVal){    hTmr->regs->PRD34 = *(loadVal);}/** ============================================================================ *   @n@b CSL_TmrLoadPrescalar34 * *   @b Description *      Loads the General purpose timer prescalr register34 * *   @b Arguments *   @verbatim        hTmr            Handle to the Gptimer instance        loadVal         Value to be loaded to the Gptimer prescalar register34     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to unchained mode * *   <b> Post Condition </b> *   @n  Gptimer prescalar register is loaded with the given value. * * *   @b Modifies *   @n Gptimer prescalar register 34 * *   @b Example *   @verbatim        CSL_TmrHandle      hTmr;        Uint8             *loadVal;        ...        CSL_TmrLoadPrescalar34 (hWdt, loadVal);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrLoadPrescalar34 (    CSL_TmrHandle              hTmr,    Uint8                     *loadVal){    CSL_FINS(hTmr->regs->TGCR, TMR_TGCR_PSC34, *((Uint8*)loadVal));}/** ============================================================================ *   @n@b CSL_TmrStart34 * *   @b Description *      sets the timer counting mode and timer reset * *   @b Arguments *   @verbatim        hTmr            Handle to the Gptimer instance        countMode       specifies the timer counting mode     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to any GPtimer mode * *   <b> Post Condition </b> *   @n   Set the GP Timer counting mode and timer 34 reset. * *   @b Modifies *   @n Gptimer TCR and TGCR register of timer 34 * *   @b Example *   @verbatim        CSL_TmrHandle       hTmr;        CSL_TmrEnamode      countMode;        ...        CSL_TmrStart34 (hWdt, countMode);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrStart34 (    CSL_TmrHandle     hTmr,    CSL_TmrEnamode    countMode){    CSL_FINST(hTmr->regs->TGCR, TMR_TGCR_TIM34RS, IN_RESET);    CSL_FINS(hTmr->regs->TCR, TMR_TCR_ENAMODE34, countMode);}/** ============================================================================ *   @n@b CSL_TmrStart12 * *   @b Description *      sets the timer counting mode and timer reset * *   @b Arguments *   @verbatim        hTmr            Handle to the Gptimer instance        countMode       specifies the timer counting mode     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to any GPtimer mode * *   <b> Post Condition </b> *   @n   Set the GP Timer counting mode and timer 12 reset. * * *   @b Modifies *   @n Gptimer TCR and TGCR register of timer 12 * *   @b Example *   @verbatim        CSL_TmrHandle       hTmr;        CSL_TmrEnamode      countMode;        ...        CSL_TmrStart12 (hWdt, countMode);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrStart12 (    CSL_TmrHandle     hTmr,    CSL_TmrEnamode    countMode){    CSL_FINST(hTmr->regs->TGCR, TMR_TGCR_TIM12RS, IN_RESET);    CSL_FINS(hTmr->regs->TCR, TMR_TCR_ENAMODE12, countMode);}/** ============================================================================ *   @n@b CSL_TmrStart64 * *   @b Description *      sets the timer counting mode and timer reset of GP OR chained timer * *   @b Arguments *   @verbatim        hTmr            Handle to the Gptimer instance        countMode       specifies the timer counting mode     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to any GPtimer mode * *   <b> Post Condition </b> *   @n   Set the GP OR chained timer counting mode and          timer 12 and 34 reset register. * * *   @b Modifies *   @n Gptimer TCR and TGCR register of timer 12 AND 34 * *   @b Example *   @verbatim        CSL_TmrHandle       hTmr;        CSL_TmrEnamode      countMode;        ...        CSL_TmrStart64 (hWdt, countMode);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrStart64 (    CSL_TmrHandle     hTmr,    CSL_TmrEnamode    countMode){    CSL_FINST(hTmr->regs->TGCR, TMR_TGCR_TIM12RS, IN_RESET);    CSL_FINST(hTmr->regs->TGCR, TMR_TGCR_TIM34RS, IN_RESET);    CSL_FINS(hTmr->regs->TCR, TMR_TCR_ENAMODE12, countMode);    CSL_FINS(hTmr->regs->TCR, TMR_TCR_ENAMODE34, countMode);}/** ============================================================================ *   @n@b CSL_TmrStop12 * *   @b Description *      sets the timer counting mode to stop the timer. *      The timer maintains the current value * *   @b Arguments *   @verbatim        hTmr            Handle to the Gptimer instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to any GPtimer mode * *   <b> Post Condition </b> *   @n   Set the GP Timer counting mode to stop the counting. * * *   @b Modifies *   @n Gptimer TCR of timer 12 * *   @b Example *   @verbatim        CSL_TmrHandle       hTmr;        ...        CSL_TmrStop12 (hWdt);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrStop12 (    CSL_TmrHandle    hTmr){    CSL_FINST(hTmr->regs->TCR, TMR_TCR_ENAMODE12, DISABLED);}/** ============================================================================ *   @n@b CSL_TmrStop34 * *   @b Description *      sets the timer counting mode to stop the timer. *      The timer maintains the current value * *   @b Arguments *   @verbatim        hTmr            Handle to the Gptimer instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to any GPtimer mode * *   <b> Post Condition </b> *   @n   Set the GP Timer counting mode to stop the counting. * * *   @b Modifies *   @n Gptimer TCR of timer 34 * *   @b Example *   @verbatim        CSL_TmrHandle       hTmr;        ...        CSL_TmrStop34 (hWdt);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrStop34 (    CSL_TmrHandle    hTmr){    CSL_FINST(hTmr->regs->TCR, TMR_TCR_ENAMODE34, DISABLED);}/** ============================================================================ *   @n@b CSL_TmrStop64 * *   @b Description *      sets the timer counting mode to stop the timer. *      The timer maintains the current value * *   @b Arguments *   @verbatim        hTmr            Handle to the Gptimer instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to GPtimer or Chained mode * *   <b> Post Condition </b> *   @n   Set the GP Timer counting mode to stop the counting. * * *   @b Modifies *   @n Gptimer TCR of timer 12 and 34 * *   @b Example *   @verbatim        CSL_TmrHandle       hTmr;        ...        CSL_TmrStop64 (hWdt);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrStop64 (    CSL_TmrHandle    hTmr){    CSL_FINST(hTmr->regs->TCR, TMR_TCR_ENAMODE12, DISABLED);    CSL_FINST(hTmr->regs->TCR, TMR_TCR_ENAMODE34, DISABLED);}/** ============================================================================ *   @n@b CSL_TmrReset34 * *   @b Description *      TSTAT34 is set to reset state * *   @b Arguments *   @verbatim        hTmr            Handle to the Gptimer instance     @endverbatim * *   <b> Return Value </b> *       None * *   <b> Pre Condition </b> *   @n  Timer should be set it to any unchained mode * *   <b> Post Condition </b> *   @n   TTSTAT34 is set to reset state * * *   @b Modifies *   @n Gptimer TCR of timer 34 * *   @b Example *   @verbatim        CSL_TmrHandle       hTmr;        ...        CSL_TmrReset34 (hWdt);        ...     @endverbatim * =========================================================================== */CSL_IDEF_INLINEvoid CSL_TmrReset34 (    CSL_TmrHandle     hTmr){    CSL_FINST(hTmr->regs->TGCR, TMR_TGCR_TIM34RS, IN_RESET);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -