From 79b6705bfc60ed17ddbf6c36ead99e9f5c3c7404 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 26 Feb 2014 21:06:30 +0100 Subject: Old SPI code is now disabled, new SPI code succesfully reads out WM8523 chip id. Needs lots of cleaning... --- firmware/drivers/timer.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 firmware/drivers/timer.h (limited to 'firmware/drivers/timer.h') diff --git a/firmware/drivers/timer.h b/firmware/drivers/timer.h new file mode 100644 index 0000000..1f16976 --- /dev/null +++ b/firmware/drivers/timer.h @@ -0,0 +1,47 @@ +/**************************************************************************** + * $Id:: timer.h 5823 2010-12-07 19:01:00Z usb00423 $ + * Project: NXP LPC17xx Timer example + * + * Description: + * This file contains Timer code header definition. + * + **************************************************************************** + * 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. +****************************************************************************/ +#ifndef __TIMER_H +#define __TIMER_H + +/* The test is either MAT_OUT or CAP_IN. Default is MAT_OUT. */ +/* If running DMA test, External match is not needed to trigger DMA, but still +set timer as MATx instead of CAPx. */ +#define TIMER_MATCH 1 + +/* TIME_INTERVALmS is a value to load the timer match register with + to get a 1 mS delay */ +#define TIME_INTERVALmS 1000 + +#define TIME_INTERVAL (9000000/100 - 1) + +extern void delayMs(uint8_t timer_num, uint32_t delayInMs); +extern uint32_t TimerInit( uint8_t timer_num, uint32_t timerInterval ); +extern void enable_timer( uint8_t timer_num ); +extern void disable_timer( uint8_t timer_num ); +extern void reset_timer( uint8_t timer_num ); +extern void TIMER0_interrupt (void); +extern void TIMER1_interrupt (void); +extern void TIMER2_interrupt (void); +extern void TIMER3_interrupt (void); + +#endif /* end __TIMER_H */ +/***************************************************************************** +** End Of File +******************************************************************************/ -- cgit v1.2.3