Narshil tibbers
/
ExampleCLasses
Simple example of Classes
FunctionsStuff.cpp@0:8161780f82c0, 2017-09-26 (annotated)
- Committer:
- zer044
- Date:
- Tue Sep 26 08:44:20 2017 +0000
- Revision:
- 0:8161780f82c0
Example of functions with and without classes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
zer044 | 0:8161780f82c0 | 1 | #include "mbed.h" |
zer044 | 0:8161780f82c0 | 2 | #include "FastLoop.h" |
zer044 | 0:8161780f82c0 | 3 | |
zer044 | 0:8161780f82c0 | 4 | |
zer044 | 0:8161780f82c0 | 5 | DigitalOut ledy1(p8); |
zer044 | 0:8161780f82c0 | 6 | |
zer044 | 0:8161780f82c0 | 7 | void setLEDstate(int state) |
zer044 | 0:8161780f82c0 | 8 | { |
zer044 | 0:8161780f82c0 | 9 | ledy1.write(state); |
zer044 | 0:8161780f82c0 | 10 | } |