blinky example from NXP code bundle for LPC11Uxx. No mbed library used

Dependencies:   mbed

Committer:
alexan_e
Date:
Mon May 28 00:13:23 2012 +0000
Revision:
1:0f1be4e75668

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
alexan_e 1:0f1be4e75668 1 /****************************************************************************
alexan_e 1:0f1be4e75668 2 * $Id:: timer16.h 6956 2011-03-23 23:03:25Z usb00423 $
alexan_e 1:0f1be4e75668 3 * Project: NXP LPC11xx software example
alexan_e 1:0f1be4e75668 4 *
alexan_e 1:0f1be4e75668 5 * Description:
alexan_e 1:0f1be4e75668 6 * This file contains definition and prototype for 16-bit timer
alexan_e 1:0f1be4e75668 7 * configuration.
alexan_e 1:0f1be4e75668 8 *
alexan_e 1:0f1be4e75668 9 ****************************************************************************
alexan_e 1:0f1be4e75668 10 * Software that is described herein is for illustrative purposes only
alexan_e 1:0f1be4e75668 11 * which provides customers with programming information regarding the
alexan_e 1:0f1be4e75668 12 * products. This software is supplied "AS IS" without any warranties.
alexan_e 1:0f1be4e75668 13 * NXP Semiconductors assumes no responsibility or liability for the
alexan_e 1:0f1be4e75668 14 * use of the software, conveys no license or title under any patent,
alexan_e 1:0f1be4e75668 15 * copyright, or mask work right to the product. NXP Semiconductors
alexan_e 1:0f1be4e75668 16 * reserves the right to make changes in the software without
alexan_e 1:0f1be4e75668 17 * notification. NXP Semiconductors also make no representation or
alexan_e 1:0f1be4e75668 18 * warranty that such application will be suitable for the specified
alexan_e 1:0f1be4e75668 19 * use without further testing or modification.
alexan_e 1:0f1be4e75668 20 ****************************************************************************/
alexan_e 1:0f1be4e75668 21 #ifndef __TIMER16_H
alexan_e 1:0f1be4e75668 22 #define __TIMER16_H
alexan_e 1:0f1be4e75668 23
alexan_e 1:0f1be4e75668 24 /* The test is either MAT_OUT or CAP_IN. Default is MAT_OUT. */
alexan_e 1:0f1be4e75668 25 #define TIMER_MATCH 0
alexan_e 1:0f1be4e75668 26
alexan_e 1:0f1be4e75668 27
alexan_e 1:0f1be4e75668 28 #define EMC0 4
alexan_e 1:0f1be4e75668 29 #define EMC1 6
alexan_e 1:0f1be4e75668 30 #define EMC2 8
alexan_e 1:0f1be4e75668 31 #define EMC3 10
alexan_e 1:0f1be4e75668 32
alexan_e 1:0f1be4e75668 33 #define MATCH0 (1<<0)
alexan_e 1:0f1be4e75668 34 #define MATCH1 (1<<1)
alexan_e 1:0f1be4e75668 35 #define MATCH2 (1<<2)
alexan_e 1:0f1be4e75668 36 #define MATCH3 (1<<3)
alexan_e 1:0f1be4e75668 37
alexan_e 1:0f1be4e75668 38 ///* For 16-bit timer, make sure that TIME_INTERVAL should be no
alexan_e 1:0f1be4e75668 39 //greater than 0xFFFF. */
alexan_e 1:0f1be4e75668 40 #ifndef TIME_INTERVAL
alexan_e 1:0f1be4e75668 41 #define TIME_INTERVAL (SystemCoreClock/1000 - 1)
alexan_e 1:0f1be4e75668 42 #endif
alexan_e 1:0f1be4e75668 43
alexan_e 1:0f1be4e75668 44 void delayMs(uint8_t timer_num, uint32_t delayInMs);
alexan_e 1:0f1be4e75668 45 extern "C" void TIMER16_0_IRQHandler(void);
alexan_e 1:0f1be4e75668 46 extern "C" void TIMER16_1_IRQHandler(void);
alexan_e 1:0f1be4e75668 47 void enable_timer16(uint8_t timer_num);
alexan_e 1:0f1be4e75668 48 void disable_timer16(uint8_t timer_num);
alexan_e 1:0f1be4e75668 49 void reset_timer16(uint8_t timer_num);
alexan_e 1:0f1be4e75668 50 void set_timer16_capture(uint8_t timer_num, uint8_t location );
alexan_e 1:0f1be4e75668 51 void set_timer16_match(uint8_t timer_num, uint8_t match_enable, uint8_t location);
alexan_e 1:0f1be4e75668 52 void init_timer16(uint8_t timer_num, uint32_t timerInterval);
alexan_e 1:0f1be4e75668 53 void init_timer16PWM(uint8_t timer_num, uint32_t period, uint8_t match_enable, uint8_t cap_enabled);
alexan_e 1:0f1be4e75668 54 void setMatch_timer16PWM (uint8_t timer_num, uint8_t match_nr, uint32_t value);
alexan_e 1:0f1be4e75668 55
alexan_e 1:0f1be4e75668 56 #endif /* end __TIMER16_H */
alexan_e 1:0f1be4e75668 57 /*****************************************************************************
alexan_e 1:0f1be4e75668 58 ** End Of File
alexan_e 1:0f1be4e75668 59 ******************************************************************************/