This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:programming_fundamentals_rtu:interrupts_and_sub-programs [2018/02/02 14:41] – Agrisnik | en:iot-open:programming_fundamentals_rtu:interrupts_and_sub-programs [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 91: | Line 91: | ||
| The example program that uses interrupt: | The example program that uses interrupt: | ||
| + | |||
| <code c> | <code c> | ||
| volatile bool button =0; //a variable to save button state | volatile bool button =0; //a variable to save button state | ||
| Line 108: | Line 109: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | **Check yourself** | ||
| + | |||
| + | 1. What are the built-in functions used for? | ||
| + | * To reduce the size of the program | ||
| + | * To delete unnecessary functions | ||
| + | * To simplify the source file | ||
| + | * To increase the speed of the program | ||
| + | |||
| + | 2. Which of the following statements are true? | ||
| + | * built-in functions must return a value. | ||
| + | * built-in functions can not return values. | ||
| + | * The compiler can ignore the declaration of the built-in function. | ||
| + | * built-in functions can not contain more than 10 lines of code. | ||
| + | |||
| + | 3. Is it possible to guarantee that the declared built-in function is really built-in? | ||
| + | * guarantee is not possible, in each individual case it is different | ||
| + | |||
| + | * can be confidently ensured that the function you have declared as built-in is really built-in | ||
| + | | ||