-
Notifications
You must be signed in to change notification settings - Fork 0
/
TExaS.h
57 lines (50 loc) · 1.97 KB
/
TExaS.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// TExaS.h
// Runs on LM4F120/TM4C123
// Periodic timer Timer5A which will interact with debugger and grade the lab
// Periodic timer Timer4A implements analog scope
// It initializes on reset and runs whenever interrupts are enabled
// Jonathan Valvano
// January 15, 2016
/* This example accompanies the book
"Embedded Systems: Introduction to ARM Cortex M Microcontrollers",
ISBN: 978-1469998749, Jonathan Valvano, copyright (c) 2015
Copyright 2016 by Jonathan W. Valvano, [email protected]
You may use, edit, run or distribute this file
as long as the above copyright notice remains
THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
For more information about my classes, my research, and my books, see
http://users.ece.utexas.edu/~valvano/
*/
// IMPORTANT: These enumerated types are specific to Lab 8.
enum InputPorts{
SW_PIN_PA2 = 0,
SW_PIN_PB0 = 1,
SW_PIN_PE0 = 4
};
enum OutputPorts{
LED_PIN_PA3 = 0,
LED_PIN_PB1 = 1,
LED_PIN_PE1 = 4
};
enum ScopeModes{
ScopeOff = 0, // no scope needed
ScopeOn = 1 // turn on UART0 and stream analog data from PD3 to TExaSdisplay
};
// ************TExaS_Init*****************
// Initialize grader, triggered by timer 5A
// This needs to be called once
// Periodic timer Timer4A implements analog scope
// Inputs: iport input(s) connected to this port
// oport output(s) connected to this port
// scope true if oscilloscope to be implemented (uses UART0 and TExaSdisplay)
// Outputs: none
void TExaS_Init(enum InputPorts iport, enum OutputPorts oport, enum ScopeModes scope);
// ************TExaS_Stop*****************
// Stop the transfer
// Inputs: none
// Outputs: none
void TExaS_Stop(void);