Uzetherm
Speaking thermometer with video output
Functions | Variables
Uzewav.c File Reference

uzewave library based on Uzeamp More...

#include <stdbool.h>
#include <avr/io.h>
#include <stdlib.h>
#include <avr/pgmspace.h>
#include <uzebox.h>
#include <mmc.h>
#include <avr/interrupt.h>
#include "uzewav.h"
Include dependency graph for Uzewav.c:

Functions

u8 SD_init (void)
int convert_filename (unsigned char *fname)
void play_queue ()
void startSong ()
void stopSong ()
void stop_auto ()
void fat_init (unsigned char *buffer)
long GetFileSector (DirectoryTableEntry *file)
u8 find_files (const char *s)
void mmc_mixerStart (uint32_t lba)
void mmc_mixerStop ()
uint32_t mmc_mixerGetCurrentSector ()
void mmc_processMixer ()

Variables

File files [MAX_WAVES]
 array with file entries
char wav_queue [7] = {-99,-99,-99,-99,-99,-99,-99}
 queue with wave files for playing
bool playing = false
 voice output of a file is running
unsigned long sectorNo = 0
unsigned int cur
unsigned int playingFile = 0
unsigned int x
unsigned int y
unsigned long songSize = 0
bool cardDetected = false
 SD card detected.
long bootRecordSector
int reservedSectors
int sectorsPerFat
unsigned char maxRootDirectorySectors
long dirTableSector
uint32_t mmc_mixer_sector
bool mmc_mixer_active = false
long sectorsPerCluster
long maxRootDirectoryEntries
long bytesPerSector
int mixerRead
int sectorRead

Detailed Description

uzewave library based on Uzeamp

Version:
1.1
Date:
2012
Author:
Hartmut Wendt info@hwhardsoft.de.vu <http://www.hwhardsoft.de.vu/>
Alec Bourque <http://www.uzebox.org>
Note:
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Function Documentation

int convert_filename ( unsigned char *  fname)

convert the first 2 chars of WAV filename to a number

Parameters:
pointerto filename
Return values:
0..98numeric values of two first chars in filename
99first 2 chars are not numeric values

Here is the caller graph for this function:

void fat_init ( unsigned char *  buffer)

init the FAT of the SD card

Parameters:
pointerto buffer
Returns:
none

Here is the caller graph for this function:

u8 find_files ( const char *  s)

find valid files with extension of *char in the directory and store their first sector & filesize

Parameters:
pointerto string in flash with the file extension for example "GER" or "ENG"
Returns:
count of found files

Here is the call graph for this function:

Here is the caller graph for this function:

get the file sector from the SD card

Parameters:
pointerto a directory table entry
Returns:
directory table

Here is the caller graph for this function:

get current sector from SD card for playing

Parameters:
void
Returns:
current sector
void mmc_mixerStart ( uint32_t  lba)

start the mixer for sound output

Parameters:
LBA(Logical Block Addressing)
Returns:
none

Here is the caller graph for this function:

void mmc_mixerStop ( )

stop the mixer for sound output

Parameters:
void
Returns:
none

Here is the caller graph for this function:

void mmc_processMixer ( )

sound output - call once on each vsync

Parameters:
void
Returns:
none

Here is the caller graph for this function:

void play_queue ( )

play automaticaly the wave files from queue

Parameters:
void
Returns:
none

Here is the call graph for this function:

u8 SD_init ( void  )

init the SD card for voice output

Parameters:
void
Return values:
0SD card init FAILED
1FIRST READ FAILED
2SD card init ok

Here is the caller graph for this function:

void startSong ( )

start playing of voice file

Parameters:
void
Returns:
none

Here is the call graph for this function:

Here is the caller graph for this function:

void stop_auto ( )

stop playing of voice file automaticaly at the end of voice file

Parameters:
void
Returns:
none

Here is the call graph for this function:

void stopSong ( )

stop playing of voice file before the end of voice file

Parameters:
void
Returns:
none

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Files Functions Variables Defines