The common folder libraries from keil LPC11Uxx code bundle

Committer:
alexan_e
Date:
Sun May 27 23:59:30 2012 +0000
Revision:
0:05d110ee258e

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
alexan_e 0:05d110ee258e 1 /****************************************************************************
alexan_e 0:05d110ee258e 2 * $Id:: timer16.h 6956 2011-03-23 23:03:25Z usb00423 $
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 16-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 __TIMER16_H
alexan_e 0:05d110ee258e 22 #define __TIMER16_H
alexan_e 0:05d110ee258e 23
alexan_e 0:05d110ee258e 24 /* The test is either MAT_OUT or CAP_IN. Default is MAT_OUT. */
alexan_e 0:05d110ee258e 25 #define TIMER_MATCH 0
alexan_e 0:05d110ee258e 26
alexan_e 0:05d110ee258e 27
alexan_e 0:05d110ee258e 28 #define EMC0 4
alexan_e 0:05d110ee258e 29 #define EMC1 6
alexan_e 0:05d110ee258e 30 #define EMC2 8
alexan_e 0:05d110ee258e 31 #define EMC3 10
alexan_e 0:05d110ee258e 32
alexan_e 0:05d110ee258e 33 #define MATCH0 (1<<0)
alexan_e 0:05d110ee258e 34 #define MATCH1 (1<<1)
alexan_e 0:05d110ee258e 35 #define MATCH2 (1<<2)
alexan_e 0:05d110ee258e 36 #define MATCH3 (1<<3)
alexan_e 0:05d110ee258e 37
alexan_e 0:05d110ee258e 38 ///* For 16-bit timer, make sure that TIME_INTERVAL should be no
alexan_e 0:05d110ee258e 39 //greater than 0xFFFF. */
alexan_e 0:05d110ee258e 40 #ifndef TIME_INTERVAL
alexan_e 0:05d110ee258e 41 #define TIME_INTERVAL (SystemCoreClock/1000 - 1)
alexan_e 0:05d110ee258e 42 #endif
alexan_e 0:05d110ee258e 43
alexan_e 0:05d110ee258e 44 void delayMs(uint8_t timer_num, uint32_t delayInMs);
alexan_e 0:05d110ee258e 45 extern "C" void TIMER16_0_IRQHandler(void);
alexan_e 0:05d110ee258e 46 extern "C" void TIMER16_1_IRQHandler(void);
alexan_e 0:05d110ee258e 47 void enable_timer16(uint8_t timer_num);
alexan_e 0:05d110ee258e 48 void disable_timer16(uint8_t timer_num);
alexan_e 0:05d110ee258e 49 void reset_timer16(uint8_t timer_num);
alexan_e 0:05d110ee258e 50 void set_timer16_capture(uint8_t timer_num, uint8_t location );
alexan_e 0:05d110ee258e 51 void set_timer16_match(uint8_t timer_num, uint8_t match_enable, uint8_t location);
alexan_e 0:05d110ee258e 52 void init_timer16(uint8_t timer_num, uint32_t timerInterval);
alexan_e 0:05d110ee258e 53 void init_timer16PWM(uint8_t timer_num, uint32_t period, uint8_t match_enable, uint8_t cap_enabled);
alexan_e 0:05d110ee258e 54 void setMatch_timer16PWM (uint8_t timer_num, uint8_t match_nr, uint32_t value);
alexan_e 0:05d110ee258e 55
alexan_e 0:05d110ee258e 56 #endif /* end __TIMER16_H */
alexan_e 0:05d110ee258e 57 /*****************************************************************************
alexan_e 0:05d110ee258e 58 ** End Of File
alexan_e 0:05d110ee258e 59 ******************************************************************************/