This is the P1.0 (Timer1/capture1) initialization code for rpm reading.
TIM_COUNTERCFG_Type TIM_FanspeedTimerConfig;
TIM_CAPTURECFG_Type TIM_FanspeedCaptureConfig;
TIM_FanspeedCaptureConfig.CaptureChannel = TIM_COUNTER_INCAP1;
TIM_FanspeedCaptureConfig.RisingEdge = ENABLE;
TIM_FanspeedCaptureConfig.FallingEdge = DISABLE;
TIM_FanspeedCaptureConfig.IntOnCaption = DISABLE;
TIM_ConfigCapture(LPC_TIMER1,&TIM_FanspeedCaptureConfig);
TIM_ResetCounter(LPC_TIMER1);
TIM_Cmd(LPC_TIMER1,ENABLE);