#include <sys/types.h>
Functions | |
void | mic_init (void) |
u_short | mic_read (void) |
Reads loudest microphone value. | |
void | mic_set_leds (u_short mic_val) |
Sets the LEDs according to mic val. |
void mic_init | ( | void | ) |
Initialize microphone sampling.
This will start a seperate low priority thread that continuously reads microphone values. The ADC is set to free running mode and samples values at 62.5kHz ( clock).
u_short mic_read | ( | void | ) |
Reads loudest microphone value.
This function returns the loudest sampled microphone value since the last time it has been called. The values range from 0 to 1023 (loudest).
void mic_set_leds | ( | u_short | mic_val | ) |
Sets the LEDs according to mic val.
silence: all LEDs off . one LEDs on . two LEDs on . three LEDs on very loud: all LEDs on
mic_val | microphone value |