C Language Development Kit/Functions/IsBuzzerOn
From OptiWiki
| Description | This function checks whether the buzzer is currently busy or not. | ||||
| Syntax | int isBuzzerOn(void); | ||||
| Arguments | None | ||||
| Returns |
| ||||
| Remarks | This function can be used to check whether the beep sequence of the sound() function is finished or not. | ||||
| Example | #include "lib.h" #include <stdio.h> void main( void ) { while( 1 ) { sound(TSTANDARD, VHIGH, SLOW, SPAUSE, SMEDIUM, SPAUSE, SHIGH, SPAUSE, 0); while( isBuzzerOn() ) idle(); sound(TSTANDARD, VHIGH, SHIGH, SPAUSE, SMEDIUM, SPAUSE, SLOW, SPAUSE,0); while( isBuzzerOn() ) idle(); } } |
