Skip to content

Commit c445b41

Browse files
committed
fixup! Add a sleep() function with seconds duration
1 parent 6383d53 commit c445b41

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void sleep_ticks(uint32_t ticks)
5656
*
5757
* @param[in] seconds Sleep duration, in seconds.
5858
*/
59-
void sleep(float seconds)
59+
void sleep_seconds(float seconds)
6060
{
6161
sleep_ticks((uint32_t)(seconds * SYSTICK_FREQUENCY_HZ));
6262
}

src/clock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void each(uint32_t period, void (*function)(void), uint32_t during);
1111
uint32_t get_clock_ticks(void);
1212
uint32_t read_cycle_counter(void);
1313
void sleep_ticks(uint32_t ticks);
14-
void sleep(float seconds);
14+
void sleep_seconds(float seconds);
1515
void stopwatch_start(void);
1616
float stopwatch_stop(void);
1717
void sleep_us(uint32_t us);

src/speaker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void speaker_play(char note, uint8_t octave, int8_t accidental, float duration)
7575
setup_speaker();
7676
speaker_set_frequency(frequency);
7777
speaker_on();
78-
sleep(duration);
78+
sleep_seconds(duration);
7979
speaker_off();
8080
setup_emitters();
8181
}

0 commit comments

Comments
 (0)