The common folder libraries from keil LPC11Uxx code bundle
timer32.h@0:05d110ee258e, 2012-05-27 (annotated)
- Committer:
- alexan_e
- Date:
- Sun May 27 23:59:30 2012 +0000
- Revision:
- 0:05d110ee258e
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alexan_e | 0:05d110ee258e | 1 | /**************************************************************************** |
alexan_e | 0:05d110ee258e | 2 | * $Id:: timer32.h 7146 2011-04-19 19:48:01Z nxp28548 $ |
alexan_e | 0:05d110ee258e | 3 | * Project: NXP LPC11xx software example |
alexan_e | 0:05d110ee258e | 4 | * |
alexan_e | 0:05d110ee258e | 5 | * Description: |
alexan_e | 0:05d110ee258e | 6 | * This file contains definition and prototype for 32-bit timer |
alexan_e | 0:05d110ee258e | 7 | * configuration. |
alexan_e | 0:05d110ee258e | 8 | * |
alexan_e | 0:05d110ee258e | 9 | **************************************************************************** |
alexan_e | 0:05d110ee258e | 10 | * Software that is described herein is for illustrative purposes only |
alexan_e | 0:05d110ee258e | 11 | * which provides customers with programming information regarding the |
alexan_e | 0:05d110ee258e | 12 | * products. This software is supplied "AS IS" without any warranties. |
alexan_e | 0:05d110ee258e | 13 | * NXP Semiconductors assumes no responsibility or liability for the |
alexan_e | 0:05d110ee258e | 14 | * use of the software, conveys no license or title under any patent, |
alexan_e | 0:05d110ee258e | 15 | * copyright, or mask work right to the product. NXP Semiconductors |
alexan_e | 0:05d110ee258e | 16 | * reserves the right to make changes in the software without |
alexan_e | 0:05d110ee258e | 17 | * notification. NXP Semiconductors also make no representation or |
alexan_e | 0:05d110ee258e | 18 | * warranty that such application will be suitable for the specified |
alexan_e | 0:05d110ee258e | 19 | * use without further testing or modification. |
alexan_e | 0:05d110ee258e | 20 | ****************************************************************************/ |
alexan_e | 0:05d110ee258e | 21 | #ifndef __TIMER32_H |
alexan_e | 0:05d110ee258e | 22 | #define __TIMER32_H |
alexan_e | 0:05d110ee258e | 23 | |
alexan_e | 0:05d110ee258e | 24 | /* The test is either MAT_OUT or CAP_IN. Default is CAP_IN. */ |
alexan_e | 0:05d110ee258e | 25 | #ifndef TIMER_MATCH |
alexan_e | 0:05d110ee258e | 26 | #define TIMER_MATCH 0 |
alexan_e | 0:05d110ee258e | 27 | #endif//TIMER_MATCH |
alexan_e | 0:05d110ee258e | 28 | |
alexan_e | 0:05d110ee258e | 29 | #define EMC0 4 |
alexan_e | 0:05d110ee258e | 30 | #define EMC1 6 |
alexan_e | 0:05d110ee258e | 31 | #define EMC2 8 |
alexan_e | 0:05d110ee258e | 32 | #define EMC3 10 |
alexan_e | 0:05d110ee258e | 33 | |
alexan_e | 0:05d110ee258e | 34 | #define MATCH0 (1<<0) |
alexan_e | 0:05d110ee258e | 35 | #define MATCH1 (1<<1) |
alexan_e | 0:05d110ee258e | 36 | #define MATCH2 (1<<2) |
alexan_e | 0:05d110ee258e | 37 | #define MATCH3 (1<<3) |
alexan_e | 0:05d110ee258e | 38 | |
alexan_e | 0:05d110ee258e | 39 | #ifndef TIME_INTERVAL |
alexan_e | 0:05d110ee258e | 40 | #define TIME_INTERVAL (SystemCoreClock/100 - 1) |
alexan_e | 0:05d110ee258e | 41 | #endif |
alexan_e | 0:05d110ee258e | 42 | |
alexan_e | 0:05d110ee258e | 43 | void delay32Ms(uint8_t timer_num, uint32_t delayInMs); |
alexan_e | 0:05d110ee258e | 44 | void TIMER32_0_IRQHandler(void); |
alexan_e | 0:05d110ee258e | 45 | void TIMER32_1_IRQHandler(void); |
alexan_e | 0:05d110ee258e | 46 | void enable_timer32(uint8_t timer_num); |
alexan_e | 0:05d110ee258e | 47 | void disable_timer32(uint8_t timer_num); |
alexan_e | 0:05d110ee258e | 48 | void reset_timer32(uint8_t timer_num); |
alexan_e | 0:05d110ee258e | 49 | void set_timer32_capture(uint8_t timer_num, uint8_t location ); |
alexan_e | 0:05d110ee258e | 50 | void set_timer32_match(uint8_t timer_num, uint8_t match_enable, uint8_t location); |
alexan_e | 0:05d110ee258e | 51 | void init_timer32(uint8_t timer_num, uint32_t timerInterval); |
alexan_e | 0:05d110ee258e | 52 | void init_timer32PWM(uint8_t timer_num, uint32_t period, uint8_t match_enable); |
alexan_e | 0:05d110ee258e | 53 | void setMatch_timer32PWM (uint8_t timer_num, uint8_t match_nr, uint32_t value); |
alexan_e | 0:05d110ee258e | 54 | |
alexan_e | 0:05d110ee258e | 55 | #endif /* end __TIMER32_H */ |
alexan_e | 0:05d110ee258e | 56 | /***************************************************************************** |
alexan_e | 0:05d110ee258e | 57 | ** End Of File |
alexan_e | 0:05d110ee258e | 58 | ******************************************************************************/ |