Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
int
main(int argc, char **argv) {
int chord[] = { DO, RE, MI, FA, SOL, LA, SI, DO, SI };
int
main(int argc, char **argv) {
int chord[] = { DO, RE, MI, FA, SOL, LA, SI, DO, SI };
// create Buzzer instance
upm::Buzzer* sound = new upm::Buzzer(5);
// print sensor name
// create Buzzer instance
upm::Buzzer* sound = new upm::Buzzer(5);
// print sensor name
std::cout << "exiting application" << std::endl;
delete sound;
std::cout << "exiting application" << std::endl;
delete sound;
+/**
+ * @brief C++ API for Buzzer servo component
+ *
+ * This file defines the Buzzer C++ interface for libbuzzer
+ *
+ * @snippet es08a.cxx Interesting
+ *
+ */
+ /**
+ * Instanciates a Buzzer object
+ *
+ * @param pin Buzzer pin number
+ */
+
+ /**
+ * Buzzer object destructor.
+ */
+
+ /**
+ * Play chords.
+ *
+ * @param note chords (DO, RE, ME, etc...)
+ */
int playSound (int note);
int playSound (int note);
+
+ /**
+ * Return name of the component
+ */
std::string name()
{
return m_name;
std::string name()
{
return m_name;