mirror of
https://github.com/JorjBauer/aiie.git
synced 2024-12-28 05:29:51 +00:00
basic speaker functionality (on/off).
This commit is contained in:
parent
b303a04d76
commit
bfa402104d
@ -21,8 +21,11 @@ void TeensySpeaker::toggle(uint32_t c)
|
||||
|
||||
mixerValue = (toggleState ? 0x1FF : 0x00);
|
||||
mixerValue >>= (16-g_volume);
|
||||
|
||||
analogWrite(speakerPin, mixerValue);
|
||||
|
||||
// FIXME: this is one helluva hack
|
||||
if (g_volume >= 8)
|
||||
digitalWrite(speakerPin, toggleState ? HIGH : LOW);
|
||||
//analogWrite(speakerPin, mixerValue);
|
||||
}
|
||||
|
||||
void TeensySpeaker::maintainSpeaker(uint32_t c, uint64_t runtimeInMicros)
|
||||
|
Loading…
Reference in New Issue
Block a user