collab/PineapplePad
git clone https://git.julia.blue/collab/PineapplePad
aa6d022
master
1// Timer1.h 2// Runs on LM4F120/TM4C123 3// Use Timer1 in 32-bit periodic mode to request interrupts at a periodic rate 4// Daniel Valvano 5// March 20, 2014 6 7/* This example accompanies the book 8"Embedded Systems: Real Time Interfacing to Arm Cortex M Microcontrollers", 9ISBN: 978-1463590154, Jonathan Valvano, copyright (c) 2013 10Program 7.5, example 7.6 11 12Copyright 2013 by Jonathan W. Valvano, valvano@mail.utexas.edu 13You may use, edit, run or distribute this file 14as long as the above copyright notice remains 15THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED 16OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF 17MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. 18VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, 19OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. 20For more information about my classes, my research, and my books, see 21http://users.ece.utexas.edu/~valvano/ 22*/ 23 24#ifndef __TIMER1INTS_H__ // do not include more than once 25#define __TIMER1INTS_H__ 26#include <stdint.h> 27 28// ***************** Timer1_Init **************** 29// Activate Timer1 interrupts to run user task periodically 30// Inputs: task is a pointer to a user function 31// period in units (1/clockfreq) 32// Outputs: none 33void Timer1_Init (void (* task )(void ),uint32_t period ); 34 35#endif // __TIMER1INTS_H__