Skip to content

Commit b39eb3e

Browse files
committed
countup removed from examples + header
1 parent 346fa4e commit b39eb3e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Diff for: cores/esp32/esp32-hal-timer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern "C" {
3131
*/
3232
typedef gptimer_handle_t hw_timer_t;
3333

34-
hw_timer_t timerBegin(uint32_t frequency, bool countUp);
34+
hw_timer_t timerBegin(uint32_t frequency);
3535
void timerEnd(hw_timer_t timer);
3636

3737
void timerAttachInterrupt(hw_timer_t timer, void (*fn)(void));

Diff for: libraries/ESP32/examples/Timer/RepeatTimer/RepeatTimer.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void setup() {
3939
timerSemaphore = xSemaphoreCreateBinary();
4040

4141
// Set timer frequency to 1Mhz
42-
timer = timerBegin(1000000, true);
42+
timer = timerBegin(1000000);
4343

4444
// Attach onTimer function to our timer.
4545
timerAttachInterrupt(timer, &onTimer);

Diff for: libraries/ESP32/examples/Timer/WatchdogTimer/WatchdogTimer.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void setup() {
1616
Serial.println("running setup");
1717

1818
pinMode(button, INPUT_PULLUP); //init control pin
19-
timer = timerBegin(1000000, true); //timer 1Mhz resolution
19+
timer = timerBegin(1000000); //timer 1Mhz resolution
2020
timerAttachInterrupt(timer, &resetModule); //attach callback
2121
timerAlarmWrite(timer, wdtTimeout * 1000, false, 0); //set time in us
2222
}

Diff for: tests/timer/timer.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static volatile bool alarm_flag;
1717

1818
/* These functions are intended to be called before and after each test. */
1919
void setUp(void) {
20-
timer = timerBegin(TIMER_FREQUENCY, true);
20+
timer = timerBegin(TIMER_FREQUENCY);
2121
timerStop(timer);
2222
timerRestart(timer);
2323
}
@@ -66,7 +66,7 @@ void timer_divider_test(void){
6666

6767
// compare divider 16 and 8, value should be double
6868
timerEnd(timer);
69-
timer = timerBegin(2 * TIMER_FREQUENCY, true);
69+
timer = timerBegin(2 * TIMER_FREQUENCY);
7070
timerRestart(timer);
7171

7272
delay(1000);
@@ -77,7 +77,7 @@ void timer_divider_test(void){
7777

7878
// divider is 256, value should be 2^4
7979
timerEnd(timer);
80-
timer = timerBegin(TIMER_FREQUENCY / 16, true);
80+
timer = timerBegin(TIMER_FREQUENCY / 16);
8181
timerRestart(timer);
8282
delay(1000);
8383
comp_time_val = timerRead(timer);
@@ -98,7 +98,7 @@ void timer_read_test(void){
9898

9999
void timer_clock_select_test(void){
100100
// Set timer frequency that can be achieved using XTAL clock source (autoselected)
101-
timer_XTAL = timerBegin(TIMER_FREQUENCY_XTAL_CLK, true);
101+
timer_XTAL = timerBegin(TIMER_FREQUENCY_XTAL_CLK);
102102

103103
uint32_t resolution = timerGetFrequency(timer_XTAL);
104104
TEST_ASSERT_EQUAL(TIMER_FREQUENCY_XTAL_CLK,resolution);

0 commit comments

Comments
 (0)