keil_examples/timer/timer.c
/******************************************************************************
** Function name:		enable_timer
**
** Descriptions:		Enable timer
**
** parameters:			timer number: 0 or 1 or 2 or 3
** Returned value:		None
** 
******************************************************************************/
Function name:         enable_timer
Descriptions:          Enable timer

timer number: 0 or 1 or 2 or 3
Returned value:                None
Function name : enable_timer Descriptions : Enable timer timer number : 0 or 1 or 2 or 3 Returned value : None
void enable_timer( uint8_t timer_num )
{
  if ( timer_num == 0 )
  {
	LPC_TIM0->TCR = 1;
  }
  else if ( timer_num == 1 )
  {
	LPC_TIM1->TCR = 1;
  }
  else if ( timer_num == 2 )
  {
	LPC_TIM2->TCR = 1;
  }
  else if ( timer_num == 3 )
  {
	LPC_TIM3->TCR = 1;
  }
  return;
}
void enable_timer ( uint8_t timer_num ) { if ( timer_num == 0 ) { LPC_TIM0 -> TCR = 1 ; } else if ( timer_num == 1 ) { LPC_TIM1 -> TCR = 1 ; } else if ( timer_num == 2 ) { LPC_TIM2 -> TCR = 1 ; } else if ( timer_num == 3 ) { LPC_TIM3 -> TCR = 1 ; } return ; }
Function name:         enable_timer
Descriptions:          Enable timer
Function name : enable_timer Descriptions : Enable timer