MidTerm03/main.c
// Implementation of setting timer's target with unit of 100us
Implementation of setting timer's target with unit of 100us
Implementation of setting timer ' s target with unit of 100us
void RT_T1_Set100u(int n, int irq) {
	MemoryAnd32(T1_CTL0_REG, ~(1<<7));
	MemoryWrite32(T1_CLK_REG, 0xff);
	MemoryWrite32(T1_REF_REG, n);
	MemoryOr32(T1_CTL0_REG, (0x02 | (irq << 7)));
	MemoryOr32(SYS_CTL0_REG, irq);
}
void RT_T1_Set100u ( int n , int irq ) { MemoryAnd32 ( T1_CTL0_REG , ~ ( 1 << 7 ) ) ; MemoryWrite32 ( T1_CLK_REG , 0xff ) ; MemoryWrite32 ( T1_REF_REG , n ) ; MemoryOr32 ( T1_CTL0_REG , ( 0x02 | ( irq << 7 ) ) ) ; MemoryOr32 ( SYS_CTL0_REG , irq ) ; }
Implementation of setting timer's target with unit of 100us
Implementation of setting timer ' s target with unit of 100us