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