![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Template project for University of York ELE00032C Lab 3 tasks
main.cpp@2:64d80449da6d, 2021-01-12 (annotated)
- Committer:
- ajp109
- Date:
- Tue Jan 12 15:24:52 2021 +0000
- Revision:
- 2:64d80449da6d
- Parent:
- 1:6923dfa9901e
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ajp109 | 0:77209603a6fe | 1 | #include "mbed.h" |
ajp109 | 0:77209603a6fe | 2 | |
ajp109 | 2:64d80449da6d | 3 | void test() { |
ajp109 | 2:64d80449da6d | 4 | int count = 3; |
ajp109 | 2:64d80449da6d | 5 | printf("In test(), count = %d\r\n", count); |
ajp109 | 2:64d80449da6d | 6 | } |
ajp109 | 2:64d80449da6d | 7 | |
ajp109 | 0:77209603a6fe | 8 | int main() |
ajp109 | 0:77209603a6fe | 9 | { |
ajp109 | 2:64d80449da6d | 10 | int count = 5; |
ajp109 | 0:77209603a6fe | 11 | |
ajp109 | 2:64d80449da6d | 12 | test(); |
ajp109 | 2:64d80449da6d | 13 | |
ajp109 | 2:64d80449da6d | 14 | printf("In main(), count = %d\r\n", count); |
ajp109 | 0:77209603a6fe | 15 | |
ajp109 | 0:77209603a6fe | 16 | // Do nothing, forever... |
ajp109 | 0:77209603a6fe | 17 | while (true); |
ajp109 | 0:77209603a6fe | 18 | } |