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
+ */
25
16
26
17
#pragma once
27
18
28
- # include " sfeQwiicBuzzer.h "
19
+ // clang-format off
29
20
#include < SparkFun_Toolkit.h>
30
-
31
- class QwiicBuzzer : public sfeQwiicBuzzer
21
+ #include " sfTk/sfDevBuzzer.h"
22
+ // clang-format on
23
+ class QwiicBuzzer : public sfDevBuzzer
32
24
{
33
25
public:
34
26
// / @brief Begins the Qwiic Buzzer
@@ -41,16 +33,16 @@ class QwiicBuzzer : public sfeQwiicBuzzer
41
33
_theI2CBus.init (wirePort, address);
42
34
43
35
// Begin the sensor
44
- return sfeQwiicBuzzer ::begin (&_theI2CBus) == kSTkErrOk ;
36
+ return sfDevBuzzer ::begin (&_theI2CBus) == ksfTkErrOk ;
45
37
}
46
38
47
39
// / @brief Checks if the Qwiic Buzzer is connected
48
40
// / @return True if the sensor is connected, false otherwise
49
41
bool isConnected ()
50
42
{
51
- return sfeQwiicBuzzer ::isConnected () == kSTkErrOk ;
43
+ return sfDevBuzzer ::isConnected () == ksfTkErrOk ;
52
44
}
53
45
54
46
private:
55
- sfeTkArdI2C _theI2CBus;
47
+ sfTkArdI2C _theI2CBus;
56
48
};
0 commit comments