相关代码 |
|
#include "system.h" void initTimer() { *pTIMER_DISABLE = TIMDIS0; // disable timer 2 *pTIMER0_PERIOD = 525; *pTIMER0_WIDTH = 1; *pTIMER0_CONFIG = PWM_OUT | PULSE_HI | PERIOD_CNT | CLK_SEL | TIN_SEL | IRQ_ENA | EMU_RUN; *pTIMER_ENABLE = TIMEN0; asm("ssync;"); }
相关资源 |
|