mirror of
https://github.com/eclipse/upm.git
synced 2025-06-08 14:20:38 +03:00
doxygen: Added documentation to Buzzer sensor
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
This commit is contained in:
parent
864306acf5
commit
236cc9acc1
@ -43,6 +43,8 @@ sig_handler(int signo)
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int chord[] = { DO, RE, MI, FA, SOL, LA, SI, DO, SI };
|
||||
|
||||
//! [Interesting]
|
||||
// create Buzzer instance
|
||||
upm::Buzzer* sound = new upm::Buzzer(5);
|
||||
// print sensor name
|
||||
@ -57,6 +59,7 @@ main(int argc, char **argv) {
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
//! [Interesting]
|
||||
|
||||
std::cout << "exiting application" << std::endl;
|
||||
|
||||
|
@ -36,11 +36,38 @@
|
||||
|
||||
namespace upm {
|
||||
|
||||
/**
|
||||
* @brief C++ API for Buzzer servo component
|
||||
*
|
||||
* This file defines the Buzzer C++ interface for libbuzzer
|
||||
*
|
||||
* @snippet es08a.cxx Interesting
|
||||
*
|
||||
*/
|
||||
class Buzzer {
|
||||
public:
|
||||
/**
|
||||
* Instanciates a Buzzer object
|
||||
*
|
||||
* @param pin Buzzer pin number
|
||||
*/
|
||||
Buzzer (int pinNumber);
|
||||
|
||||
/**
|
||||
* Buzzer object destructor.
|
||||
*/
|
||||
~Buzzer ();
|
||||
|
||||
/**
|
||||
* Play chords.
|
||||
*
|
||||
* @param note chords (DO, RE, ME, etc...)
|
||||
*/
|
||||
int playSound (int note);
|
||||
|
||||
/**
|
||||
* Return name of the component
|
||||
*/
|
||||
std::string name()
|
||||
{
|
||||
return m_name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user