![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
this is the library of the code of the second laboration.
Dependencies: SILABS_RHT mbed MemoryLCD
lb123.h
- Committer:
- mara1802
- Date:
- 2020-09-04
- Revision:
- 0:33ae04d01fd6
File content as of revision 0:33ae04d01fd6:
#ifndef MAIN_H #define MAIN_H #include "mbed.h" /** led class. A collection of functions created for lab 2 in the course ET095G * Mahmood Rahimi och Alia Jabar. To use this library, its header file needs to be included and an object of the led class created.. * * Example: * @code * #include "mbed.h" * #include "lb123.h" * * my led; * * int main() { * @endcode */ class led { public: /** The constructor creates an instance of the led class. It is automatically called when a new object is declared. */ led(); /** Det är funktion för slå på led0. */ void led::on_led0(); /** det är funktion för slå på led1. */ void led::on_led1(); /** Det är funktion för slå off led0. */ void led::off_led0(); /** Det är funktion för slå off led1. */ void led::off_led1(); /** This function inverts the state of led0, so off becomes on and on becomes off. */ void led::toggle_led0(); /** This function inverts the state of led1, so off becomes on and on becomes off. */ void led::toggle_led1(); /** This function blinks led0 once. */ void led::blink_led0(); /** This function blinks led1 once. */ void led::blink_led1(); private: DigitalOut led0; DigitalOut led1; }; #endif