Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Ka.h@0:2270b7a3a8ad, 2017-11-16 (annotated)
- Committer:
- Kaniiii
- Date:
- Thu Nov 16 15:49:53 2017 +0000
- Revision:
- 0:2270b7a3a8ad
- Child:
- 2:14bfd1fc2163
My library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kaniiii | 0:2270b7a3a8ad | 1 | #ifndef Ka_FILE |
Kaniiii | 0:2270b7a3a8ad | 2 | #define Ka_FILE |
Kaniiii | 0:2270b7a3a8ad | 3 | |
Kaniiii | 0:2270b7a3a8ad | 4 | #include "mbed.h" |
Kaniiii | 0:2270b7a3a8ad | 5 | /** Ka class. |
Kaniiii | 0:2270b7a3a8ad | 6 | * Lab assignment for manipulating led0 |
Kaniiii | 0:2270b7a3a8ad | 7 | */ |
Kaniiii | 0:2270b7a3a8ad | 8 | class Ka{ |
Kaniiii | 0:2270b7a3a8ad | 9 | public : |
Kaniiii | 0:2270b7a3a8ad | 10 | /** Constructor binds a object made from the Ka class to digitalout from mbed library |
Kaniiii | 0:2270b7a3a8ad | 11 | */ |
Kaniiii | 0:2270b7a3a8ad | 12 | Ka(); |
Kaniiii | 0:2270b7a3a8ad | 13 | /** Function for setting led0 to "on" */ |
Kaniiii | 0:2270b7a3a8ad | 14 | void set_led0(); |
Kaniiii | 0:2270b7a3a8ad | 15 | /** Function for setting led0 to "off" */ |
Kaniiii | 0:2270b7a3a8ad | 16 | void clear_led0(); |
Kaniiii | 0:2270b7a3a8ad | 17 | /** Function for inverting led0 (on to off, off to on) */ |
Kaniiii | 0:2270b7a3a8ad | 18 | void invert(); |
Kaniiii | 0:2270b7a3a8ad | 19 | /** Function for making led0 blink X amount seconds */ |
Kaniiii | 0:2270b7a3a8ad | 20 | void toggle (int a); |
Kaniiii | 0:2270b7a3a8ad | 21 | |
Kaniiii | 0:2270b7a3a8ad | 22 | private: |
Kaniiii | 0:2270b7a3a8ad | 23 | DigitalOut m; |
Kaniiii | 0:2270b7a3a8ad | 24 | |
Kaniiii | 0:2270b7a3a8ad | 25 | |
Kaniiii | 0:2270b7a3a8ad | 26 | }; |
Kaniiii | 0:2270b7a3a8ad | 27 | |
Kaniiii | 0:2270b7a3a8ad | 28 | #endif |