Xyris  0.5
spkr.cpp File Reference
+ Include dependency graph for spkr.cpp:

Go to the source code of this file.

Functions

void spkr_beep (uint32_t freq, uint32_t ms)
 

Detailed Description

Author
Keeton Feavel (keeto.nosp@m.nfea.nosp@m.vel@c.nosp@m.edar.nosp@m.ville.nosp@m..edu)
Version
0.3
Date
2019-11-25

Definition in file spkr.cpp.

Function Documentation

◆ spkr_beep()

void spkr_beep ( uint32_t  freq,
uint32_t  ms 
)

Plays a given frequency for the provided duration.

Parameters
freqTone frequency
msLength in milliseconds

Definition at line 36 of file spkr.cpp.

36  {
37  spkr_tone(freq);
38  // TODO: Change this to task sleep
39  sleep(ms);
40  spkr_stop();
41  // set_PIT_2(old_frequency);
42 }
sleep
void sleep(uint32_t ms)
Sleeps for a certain length of time.
Definition: timer.cpp:52