soundout.h File Reference

SoundOut MOD-1007 (Somo-14D) audio player interface. More...

Include dependency graph for soundout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define soundout_PLAY_PAUSE_CMD   0xfffe
#define soundout_STOP_CMD   0xffff
#define soundout_VOLUME_CMD   0xfff0

Functions

uns8 soundout_is_busy ()
void soundout_play_pause ()
void soundout_reset ()
void soundout_set_file_id (uns16 file_id)
void soundout_set_volume (uns8 level)
void soundout_setup_io ()
void soundout_standby ()
void soundout_stop ()
void soundout_wake ()

Detailed Description

Library for accessing the functionality of the WTV .ad4 audio player

Put the following into your config.h

define soundout_clk_port PORTA define soundout_clk_pin 1

define soundout_data_port PORTA define soundout_data_pin 2

don't define these if you don't want to use them

define soundout_reset_port PORTA define soundout_reset_pin 3

define soundout_busy_port PORTA define soundout_busy_pin 4


Define Documentation

#define soundout_PLAY_PAUSE_CMD   0xfffe
#define soundout_STOP_CMD   0xffff
#define soundout_VOLUME_CMD   0xfff0

Function Documentation

uns8 soundout_is_busy (  ) 

00123                         {
00124     #ifdef soundout_busy_port 
00125         return test_pin(soundout_busy_port, soundout_busy_pin);
00126     #else
00127         return 0;
00128     #endif  
00129 }

void soundout_play_pause (  ) 

Here is the call graph for this function:

void soundout_reset (  ) 

00057                       {
00058     #ifdef soundout_reset_port 
00059         clear_pin(soundout_reset_port, soundout_reset_pin);
00060         delay_ms(10);   // minimum 5ms
00061         set_pin(soundout_reset_port, soundout_reset_pin);
00062     #endif
00063 }       

void soundout_set_file_id ( uns16  file_id  ) 

00103                                          {
00104 
00105     soundout_send_data(file_id);
00106 }

Here is the call graph for this function:

void soundout_set_volume ( uns8  level  ) 

00108                                      {
00109     level = level & 0x07;
00110     soundout_send_data(soundout_VOLUME_CMD + level);
00111 }

Here is the call graph for this function:

void soundout_setup_io (  ) 

00041                          {
00042     
00043     make_output(soundout_clk_port, soundout_clk_pin);
00044     set_pin(soundout_clk_port, soundout_clk_pin);   // idle high
00045     
00046     make_output(soundout_data_port, soundout_data_pin);
00047     // don't care about data pin state
00048     #ifdef soundout_reset_port
00049         make_output(soundout_reset_port, soundout_reset_pin);
00050         set_pin(soundout_reset_port, soundout_reset_pin);
00051     #endif
00052     #ifdef soundout_busy_port
00053         make_input(soundout_busy_port, soundout_busy_pin);
00054     #endif
00055 }   

void soundout_standby (  ) 

00065                         {
00066     #ifdef soundout_reset_port 
00067         clear_pin(soundout_reset_port, soundout_reset_pin);
00068         // Need to wait for 1 second to go into standby
00069         // seems a shame to hang around here waiting though...
00070         // delay_s(1);
00071     #endif
00072 }   

void soundout_stop (  ) 

00117                      {
00118 
00119     soundout_send_data(soundout_STOP_CMD);
00120 
00121 }

Here is the call graph for this function:

void soundout_wake (  ) 

00073                      {
00074     #ifdef soundout_reset_port 
00075         set_pin(soundout_reset_port, soundout_reset_pin);
00076     #endif
00077 }   


Generated on Fri Aug 19 09:09:24 2011 for Pic Pack Library by  doxygen 1.6.1