1- /* *****************************************************************************
2- SparkFun_Qwiic_Buzzer_Arduino_Library.h
3- SparkFun Qwiic Buzzer Library header file
4-
5- by Pete Lewis @SparkFun Electronics
6- January 2024
7-
8- Based on original source code written by
9- Fischer Moseley @ SparkFun Electronics
10- Original Creation Date: July 24, 2019
11-
12- This file implements the QwiicBuzzer class, prototyped in SparkFun_Qwiic_Buzzer_Arduino_Library.h
13-
14- Development environment specifics:
15- IDE: Arduino 2.2.1
16- Hardware Platform: Arduino Uno/SparkFun Redboard
17- Qwiic Buzzer Version: v10
18-
19- SPDX-License-Identifier: MIT
20-
21- Copyright (c) 2024 SparkFun Electronics
22-
23- Distributed as-is; no warranty is given.
24- ******************************************************************************/
1+ /* *
2+ * @file SparkFun_Qwiic_Buzzer_Arduino_Library.h
3+ * @brief SparkFun Qwiic Buzzer Library header file
4+ * @author Pete Lewis \@SparkFun Electronics
5+ * @date January 2024
6+ *
7+ * @note Based on original source code written by Fischer Moseley \@ SparkFun Electronics
8+ * Original Creation Date: July 24, 2019
9+ *
10+ * @details This file implements the QwiicBuzzer class, prototyped in SparkFun_Qwiic_Buzzer_Arduino_Library.h
11+ *
12+ * @copyright Copyright (c) 2024 SparkFun Electronics. This project is released under the MIT License.
13+ * @license SPDX-License-Identifier: MIT
14+ *
15+ */
2516
2617#pragma once
2718
28- # include " sfeQwiicBuzzer.h "
19+ // clang-format off
2920#include < SparkFun_Toolkit.h>
30-
31- class QwiicBuzzer : public sfeQwiicBuzzer
21+ #include " sfTk/sfDevBuzzer.h"
22+ // clang-format on
23+ class QwiicBuzzer : public sfDevBuzzer
3224{
3325 public:
3426 // / @brief Begins the Qwiic Buzzer
@@ -41,16 +33,16 @@ class QwiicBuzzer : public sfeQwiicBuzzer
4133 _theI2CBus.init (wirePort, address);
4234
4335 // Begin the sensor
44- return sfeQwiicBuzzer ::begin (&_theI2CBus) == kSTkErrOk ;
36+ return sfDevBuzzer ::begin (&_theI2CBus) == ksfTkErrOk ;
4537 }
4638
4739 // / @brief Checks if the Qwiic Buzzer is connected
4840 // / @return True if the sensor is connected, false otherwise
4941 bool isConnected ()
5042 {
51- return sfeQwiicBuzzer ::isConnected () == kSTkErrOk ;
43+ return sfDevBuzzer ::isConnected () == ksfTkErrOk ;
5244 }
5345
5446 private:
55- sfeTkArdI2C _theI2CBus;
47+ sfTkArdI2C _theI2CBus;
5648};
0 commit comments