Skip to content

Commit 6890579

Browse files
committed
namechange cycleTime to toneFrequency
1 parent ff713a4 commit 6890579

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/SparkFun_Qwiic_Buzzer_Arduino_Library.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ unsigned long QwiicBuzzer::popClickedQueue()
262262
}
263263

264264
/*------------------------ LED Configuration ------------------------ */
265-
bool QwiicBuzzer::BUZZERconfig(uint8_t brightness, uint16_t cycleTime, uint16_t offTime, uint8_t granularity)
265+
bool QwiicBuzzer::BUZZERconfig(uint8_t brightness, uint16_t toneFrequency, uint16_t offTime, uint8_t granularity)
266266
{
267267
bool success = writeSingleRegister(SFE_QWIIC_BUTTON_LED_BRIGHTNESS, brightness);
268268
success &= writeSingleRegister(SFE_QWIIC_BUTTON_LED_PULSE_GRANULARITY, granularity);
269-
success &= writeDoubleRegister(SFE_QWIIC_BUZZER_TONE_FREQUENCY, cycleTime);
269+
success &= writeDoubleRegister(SFE_QWIIC_BUZZER_TONE_FREQUENCY, toneFrequency);
270270
success &= writeDoubleRegister(SFE_QWIIC_BUTTON_LED_PULSE_OFF_TIME, offTime);
271271
return success;
272272
}
@@ -281,9 +281,9 @@ bool QwiicBuzzer::LEDon(uint8_t brightness)
281281
return BUZZERconfig(brightness, 0, 0);
282282
}
283283

284-
bool QwiicBuzzer::on(uint16_t cycleTime, uint8_t brightness)
284+
bool QwiicBuzzer::on(uint16_t toneFrequency, uint8_t brightness)
285285
{
286-
return BUZZERconfig(brightness, cycleTime, 0);
286+
return BUZZERconfig(brightness, toneFrequency, 0);
287287
}
288288

289289
bool QwiicBuzzer::off()

src/SparkFun_Qwiic_Buzzer_Arduino_Library.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ class QwiicBuzzer
7575
unsigned long popClickedQueue(); //Returns the oldest value in the queue (milliseconds since first button click), and then removes it.
7676

7777
//LED configuration
78-
bool BUZZERconfig(uint8_t brightness, uint16_t cycleTime,
78+
bool BUZZERconfig(uint8_t brightness, uint16_t toneFrequency,
7979
uint16_t offTime, uint8_t granularity = 1); //Configures the LED with the given max brightness, granularity (1 is fine for most applications), cycle time, and off time.
8080
bool LEDoff(); //Turns the onboard LED off
8181
bool LEDon(uint8_t brightness = 255); //Turns the onboard LED on with specified brightness. Set brightness to an integer between 0 and 255, where 0 is off and 255 is max brightness.
82-
bool on(uint16_t cycleTime = 2730, uint8_t brightness = 255);
82+
bool on(uint16_t toneFrequency = 2730, uint8_t brightness = 255);
8383
bool off();
8484

8585
//Internal I2C Abstraction

0 commit comments

Comments
 (0)