关于TIVA c123g的定时器

[复制链接]
 楼主| 幽灵宇 发表于 2014-8-6 20:32 | 显示全部楼层 |阅读模式
/************************************************************
* @brief         初始化Timer0定时器中断,以10K的频率响应定时中断,
*                         通过调节PWM信号的占空比输出一组SPWM信号
* @param        null
* @return  null
************************************************************/
void Init_Timer0_SPWM() {

        // Enable the peripherals used by this example.
        ROM_SysCtlPeripheralEnable (SYSCTL_PERIPH_TIMER0);

        // Enable processor interrupts.
        ROM_IntMasterEnable ();

        // Configure the two 32-bit periodic timers.
        ROM_TimerConfigure (TIMER0_BASE, TIMER_CFG_PERIODIC);

        // 8K Hz响应
        ROM_TimerLoadSet (TIMER0_BASE, TIMER_A,
                        ROM_SysCtlClockGet() / SAMPLE_FREQUENCY);

        // Setup the interrupts for the timer timeouts.
        ROM_IntEnable (INT_TIMER0A);

        ROM_TimerIntEnable (TIMER0_BASE, TIMER_TIMA_TIMEOUT);
        // Enable the timers.
        ROM_TimerEnable (TIMER0_BASE, TIMER_A);

}

这段代码中的ROM类函数都是怎么定义的,都找不到啊~
dirtwillfly 发表于 2014-8-17 21:12 | 显示全部楼层
这列函数一般在相应头函数里有声明
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

1

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部

1

主题

1

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部