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.
Fork of Lab3 by
Revision 2:14bfd1fc2163, committed 2018-01-21
- Comitter:
- Kaniiii
- Date:
- Sun Jan 21 21:59:04 2018 +0000
- Parent:
- 1:1fed24f3a531
- Commit message:
- Library for manipulating led light (includes a main with examples of how to use the program)
Changed in this revision
--- a/Function.cpp Thu Nov 16 15:51:43 2017 +0000 +++ b/Function.cpp Sun Jan 21 21:59:04 2018 +0000 @@ -19,7 +19,7 @@ } else {m=0;} } -void Ka::toggle (int a) +void Ka::blinker (int a) { a=a+a; for (int b = 0 ; b<a ; b++){
--- a/Ka.h Thu Nov 16 15:51:43 2017 +0000 +++ b/Ka.h Sun Jan 21 21:59:04 2018 +0000 @@ -1,10 +1,21 @@ #ifndef Ka_FILE #define Ka_FILE +#include "mbed.h" -#include "mbed.h" -/** Ka class. -* Lab assignment for manipulating led0 -*/ +/** My led class. + * Used for manipulating led light on the EFM32 Happy Gecko + * + * Example: Setting the led ON + * @code + * #include "mbed.h" + * #include "Ka.h" + * + * int main() { + * Ka obj; + * obj.set_led0(); + * } + * @endcode + */ class Ka{ public : /** Constructor binds a object made from the Ka class to digitalout from mbed library @@ -16,8 +27,8 @@ void clear_led0(); /** Function for inverting led0 (on to off, off to on) */ void invert(); - /** Function for making led0 blink X amount seconds */ - void toggle (int a); + /** Function for making led0 blink. Takes amount of blink seconds as parameter*/ + void blinker (int a); private: DigitalOut m;
--- a/main.cpp Thu Nov 16 15:51:43 2017 +0000 +++ b/main.cpp Sun Jan 21 21:59:04 2018 +0000 @@ -6,6 +6,6 @@ //ha.set_led0(); //ha.clear_led0(); //ha.invert(); - //ha.toggle(10); + //ha.blinker(10); return 0; } \ No newline at end of file