-
Notifications
You must be signed in to change notification settings - Fork 0
/
lab2.h
33 lines (27 loc) · 1.12 KB
/
lab2.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
// ****************** Lab2.h ***************
// Program written by: put your names here
// Date Created: 1/18/2017
// Last Modified: 12/30/2022
// Brief description of the Lab:
#include <stdint.h>
// Inputs: x1,y1 is the first point
// x2,y2 is the second point
// Output: calculate distance
// see UART window to see if you have square, Manhattan or ECE319K distance
// The input/output values will be displayed in the UART window
int32_t Distance(int32_t x1, int32_t y1, int32_t x2, int32_t y2);
// Inputs: rect1 is x1,y1,w1,h1 the first rectangle
// rect2 is x2,y2,w2,h2 the second rectangle
// Output: 1 if the rectangles overlap
// 0 if the rectances do not overlap
// Notes: x1 is rect1[0] x2 is rect2[0]
// y1 is rect1[1] y2 is rect2[1]
// w1 is rect1[2] w2 is rect2[2]
// h1 is rect1[3] h2 is rect2[3]
// The input/output values will be displayed in the UART window
int32_t OverLap(int32_t rect1[4], int32_t rect2[4]);
// Print 7 characters of the hello message
// Inputs: language 0 to 3
// Output: none
// You should call LCD_OuChar exactly 7 times
void SayHello(uint32_t language);