Template project for University of York ELE00032C Lab 4

Dependencies:   UoY-serial

Committer:
ajp109
Date:
Sat Jan 16 22:10:24 2021 +0000
Revision:
1:8290f84652d1
Parent:
0:77209603a6fe
Child:
2:811646ac034f
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ajp109 0:77209603a6fe 1 #include "mbed.h"
ajp109 0:77209603a6fe 2
ajp109 1:8290f84652d1 3 struct IntVector {
ajp109 1:8290f84652d1 4 int x;
ajp109 1:8290f84652d1 5 int y;
ajp109 1:8290f84652d1 6 };
ajp109 1:8290f84652d1 7
ajp109 1:8290f84652d1 8 int main() {
ajp109 1:8290f84652d1 9 IntVector p;
ajp109 1:8290f84652d1 10
ajp109 1:8290f84652d1 11 p.x = -3;
ajp109 1:8290f84652d1 12 p.y = 1;
ajp109 1:8290f84652d1 13
ajp109 1:8290f84652d1 14 printf("(%d, %d)\r\n", p.x, p.y);
ajp109 1:8290f84652d1 15
ajp109 1:8290f84652d1 16 // Do nothing, forever...
ajp109 1:8290f84652d1 17 while (true);
ajp109 0:77209603a6fe 18 }