User`s manual
RabbitFLEX User’s Manual www.rabbit.com 119
6.6.9 Speaker
flexSpeakerPWM
int flexSpeakerPWM(Flex_IOPin *pin);
DESCRIPTION
Selects the PWM channel to be used for the audio and tone speaker drivers.
PARAMETER
pin Pointer to the PWM pin to use for the speaker.
RETURN VALUE
0: success
-1: error (not a PWM pin?)
SEE ALSO
flexToneActivate, flexAudioActivate
flexToneActivate
unsigned int flexToneActivate();
DESCRIPTION
Enables the tone driver so that samples can be loaded and played.
The tone driver consumes 10–20% of the processor's time while it is running. Use
flexToneShutdown() to disable the tone driver while not in use.
Do not use the tone and audio drivers simultaneously. You may switch between them within
the same program.
RETURN VALUE
The frequency of PWM pulses output by the tone driver.
SEE ALSO
flexSpeakerPWM, flexToneShutdown, flexToneLoad, flexToneStop