Date: March 20, 2011 This library is created from "LPC17xx CMSIS-Compliant Standard Peripheral Firmware Driver Library (GNU, Keil, IAR) (Jan 28, 2011)", available from NXP's website, under "All microcontrollers support documents" [[http://ics.nxp.com/support/documents/microcontrollers/?type=software]] You will need to follow [[/projects/libraries/svn/mbed/trunk/LPC1768/LPC17xx.h]] while using this library Examples provided here [[/users/frank26080115/programs/LPC1700CMSIS_Examples/]] The beautiful thing is that NXP does not place copyright protection on any of the files in here Only a few modifications are made to make it compile with the mbed online compiler, I fixed some warnings as well. This is untested as of March 20, 2011 Forum post about this library: [[/forum/mbed/topic/2030/]]

Embed: (wiki syntax)

« Back to documentation index

lpc17xx_timer.h File Reference

lpc17xx_timer.h File Reference

Contains all functions support for Timer firmware library on LPC17xx. More...

Go to the source code of this file.

Data Structures

struct  TIM_TIMERCFG_Type
 Configuration structure in TIMER mode. More...
struct  TIM_COUNTERCFG_Type
 Configuration structure in COUNTER mode. More...
struct  TIM_MATCHCFG_Type
 Match channel configuration structure. More...
struct  TIM_CAPTURECFG_Type
 Capture Input configuration structure. More...

Enumerations

enum  TIM_INT_TYPE {
  TIM_MR0_INT = 0, TIM_MR1_INT = 1, TIM_MR2_INT = 2, TIM_MR3_INT = 3,
  TIM_CR0_INT = 4, TIM_CR1_INT = 5
}
 

interrupt type

More...
enum  TIM_MODE_OPT { TIM_TIMER_MODE = 0, TIM_COUNTER_RISING_MODE, TIM_COUNTER_FALLING_MODE, TIM_COUNTER_ANY_MODE }
 

Timer/counter operating mode.

More...
enum  TIM_PRESCALE_OPT { TIM_PRESCALE_TICKVAL = 0, TIM_PRESCALE_USVAL }
 

Timer/Counter prescale option.

More...
enum  TIM_COUNTER_INPUT_OPT { TIM_COUNTER_INCAP0 = 0, TIM_COUNTER_INCAP1 }
 

Counter input option.

More...
enum  TIM_EXTMATCH_OPT { TIM_EXTMATCH_NOTHING = 0, TIM_EXTMATCH_LOW, TIM_EXTMATCH_HIGH, TIM_EXTMATCH_TOGGLE }
 

Timer/Counter external match option.

More...
enum  TIM_CAP_MODE_OPT { TIM_CAPTURE_NONE = 0, TIM_CAPTURE_RISING, TIM_CAPTURE_FALLING, TIM_CAPTURE_ANY }
 

Timer/counter capture mode options.

More...

Functions

void TIM_Init (LPC_TIM_TypeDef *TIMx, TIM_MODE_OPT TimerCounterMode, void *TIM_ConfigStruct)
 Initial Timer/Counter device Set Clock frequency for Timer Set initial configuration for Timer.
void TIM_DeInit (LPC_TIM_TypeDef *TIMx)
 Close Timer/Counter device.
void TIM_ClearIntPending (LPC_TIM_TypeDef *TIMx, TIM_INT_TYPE IntFlag)
 Clear Interrupt pending.
void TIM_ClearIntCapturePending (LPC_TIM_TypeDef *TIMx, TIM_INT_TYPE IntFlag)
 Clear Capture Interrupt pending.
FlagStatus TIM_GetIntStatus (LPC_TIM_TypeDef *TIMx, TIM_INT_TYPE IntFlag)
 Get Interrupt Status.
FlagStatus TIM_GetIntCaptureStatus (LPC_TIM_TypeDef *TIMx, TIM_INT_TYPE IntFlag)
 Get Capture Interrupt Status.
void TIM_ConfigStructInit (TIM_MODE_OPT TimerCounterMode, void *TIM_ConfigStruct)
 Configuration for Timer at initial time.
void TIM_ConfigMatch (LPC_TIM_TypeDef *TIMx, TIM_MATCHCFG_Type *TIM_MatchConfigStruct)
 Configuration for Match register.
void TIM_UpdateMatchValue (LPC_TIM_TypeDef *TIMx, uint8_t MatchChannel, uint32_t MatchValue)
 Update Match value.
void TIM_ConfigCapture (LPC_TIM_TypeDef *TIMx, TIM_CAPTURECFG_Type *TIM_CaptureConfigStruct)
 Configuration for Capture register.
void TIM_Cmd (LPC_TIM_TypeDef *TIMx, FunctionalState NewState)
 Start/Stop Timer/Counter device.
uint32_t TIM_GetCaptureValue (LPC_TIM_TypeDef *TIMx, TIM_COUNTER_INPUT_OPT CaptureChannel)
 Read value of capture register in timer/counter device.
void TIM_ResetCounter (LPC_TIM_TypeDef *TIMx)
 Reset Timer/Counter device, Make TC and PC are synchronously reset on the next positive edge of PCLK.

Detailed Description

Contains all functions support for Timer firmware library on LPC17xx.

Version:
2.0
Date:
21. May. 2010
Author:
NXP MCU SW Application Team

Software that is described herein is for illustrative purposes only which provides customers with programming information regarding the products. This software is supplied "AS IS" without any warranties. NXP Semiconductors assumes no responsibility or liability for the use of the software, conveys no license or title under any patent, copyright, or mask work right to the product. NXP Semiconductors reserves the right to make changes in the software without notification. NXP Semiconductors also make no representation or warranty that such application will be suitable for the specified use without further testing or modification.

Definition in file lpc17xx_timer.h.