ButterflyMP3

main.h File Reference

Butterfly MP3 main. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MODE_IDLE   0
#define MODE_SLEEP   1
#define MODE_PLAY   2
#define MODE_PAUSE   3
#define MODE_STOP   4
#define MODE_POWEROFF   5
#define AUTOPOWEROFF_TIMEOUT   30
 define Number of seconds till power Off when idle. 0-255. 0 = no autopoweroff
#define STAT_DISPLAY_TIME   2
 number of seconds to display stats
#define DDR(x)   ((x)-1)
#define PIN(x)   ((x)-2)
#define SCAN_JUMPTOSTART   1
 Return to first song after last when searching throught songs/.
#define PLAY_NEXT_SONG   1
 Automatically select next song when finished.
#define PLAY_REPEAT_ALL   1
 Automatically loop to start of MMC when end is reached.
#define RECURSE_DIRECTORIES   0
 Automatically recurse directories.
#define EXPERIMENTAL_FF   0
 Experimental Fast Forward mode.
#define ID3_EN   1
 Enable ID3 Tag analysis.
#define DEFAULT_MUSIC_VOLUME   5
 Initial volume when player starts up and no saved state in eeprom.
#define REV   'F'
 define Hardware PCB version
#define FAT_ON_MMC
 define storage hardware MMC or ATA (comming soon...)
#define SW_MMC_IDENTIFY
 define MMC identification method HW or SW.
#define SERIAL_ENABLE
 define Dubug output on Serial port
#define SERIAL_EXTENDED
 define enable extra functions available on the serial port
#define SAMPLEMODE_UNINTERUPTIBLE   0
 Cannot play track by number if player is currently playing.
#define SAMPLEMODE_CONTROLOUT_EN   0
 Enable external signal on sample trigger while playing.
#define SAMPLEMODE_CONTROLOUT_PORT   PORTD
 use this port to signal a sample tried to play while one was already playing.
#define SAMPLEMODE_CONTROLOUT_PIN   7
 use this pin to signal a sample tried to play while one was already playing.
#define SAMPLEMODE_ALLBUTONS   0
 disable normal joystick functions all buttons play a sample
#define FAT_NumberedSong_EN   (defined SERIAL_EXTENDED || defined MATRIX_BUTTONS || SAMPLEMODE_ALLBUTONS)
#define EEPROM_BFFRSZE   0x0F
 size of ring buffer
#define EEPROM_OPTIONS_INDEX   0xA0
 ring buffer index for player options
#define EEPROM_VOL   0x10
#define EEPROM_STATE_INDEX   0x90
 ring buffer index for player state.
#define EEPROM_FILE   0x20
#define EEPROM_MODE   0x30
#define EEPROM_SECTOR   0x40
#define EEPROM_PLAYED   0x50
#define EEPROM_VALID   0x60
#define EEPROM_TIME   0x70
#define EEPROM_DIR   0x80
#define USE_EEPROM
 Enable eeprom usaage.
#define ENDURANCE_EEPROM
 Use a ringbuffer in eeprom.

Variables

const char VERSIONINFO1 []
const char VERSIONINFO2 [] = __DATE__ __TIME__
 tag rom with compile date and time

Detailed Description

Butterfly MP3 main.

Author:
Nick Lott
Date:
November 2004
Id:
main.h,v 1.40 2009/01/21 20:40:56 brokentoaster Exp

Copyright (C) 2004 Nick Lott <nick_Lott@bigfoot.com> http://butterflymp3.sf.net/

This is a simple MP3 player based around the AVR Butterfly.It currently uses a VS1001 mp3 decoder, MMC card and Nokia LCD. It has been heavily influenced by the Yampp system by Jesper Hansen <jesperh@telia.com>.

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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Target(s)...: ATmega169

Compiler....: AVR-GCC 3.3.1; avr-libc 1.0

Definition in file main.h.


Define Documentation

#define AUTOPOWEROFF_TIMEOUT   30

define Number of seconds till power Off when idle. 0-255. 0 = no autopoweroff

Definition at line 51 of file main.h.

Referenced by main(), and mainTimer().

#define DDR (   x)    ((x)-1)

Definition at line 55 of file main.h.

#define DEFAULT_MUSIC_VOLUME   5

Initial volume when player starts up and no saved state in eeprom.

Definition at line 65 of file main.h.

#define EEPROM_BFFRSZE   0x0F

size of ring buffer

Definition at line 89 of file main.h.

Referenced by findCurrentEepromAddr(), save_player_options(), and save_player_state().

#define EEPROM_DIR   0x80

Definition at line 99 of file main.h.

Referenced by load_player_state(), and save_player_state().

#define EEPROM_FILE   0x20

Definition at line 93 of file main.h.

Referenced by load_player_state(), and save_player_state().

#define EEPROM_MODE   0x30

Definition at line 94 of file main.h.

Referenced by load_player_state(), and save_player_state().

#define EEPROM_OPTIONS_INDEX   0xA0

ring buffer index for player options

Definition at line 90 of file main.h.

Referenced by load_player_options(), and save_player_options().

#define EEPROM_PLAYED   0x50

Definition at line 96 of file main.h.

Referenced by load_player_state(), and save_player_state().

#define EEPROM_SECTOR   0x40

Definition at line 95 of file main.h.

Referenced by load_player_state(), and save_player_state().

#define EEPROM_STATE_INDEX   0x90

ring buffer index for player state.

Definition at line 92 of file main.h.

Referenced by load_player_state(), and save_player_state().

#define EEPROM_TIME   0x70

Definition at line 98 of file main.h.

Referenced by load_player_state(), and save_player_state().

#define EEPROM_VALID   0x60

Definition at line 97 of file main.h.

#define EEPROM_VOL   0x10

Definition at line 91 of file main.h.

Referenced by load_player_options(), and save_player_options().

#define ENDURANCE_EEPROM

Use a ringbuffer in eeprom.

Definition at line 101 of file main.h.

#define EXPERIMENTAL_FF   0

Experimental Fast Forward mode.

Definition at line 63 of file main.h.

#define FAT_NumberedSong_EN   (defined SERIAL_EXTENDED || defined MATRIX_BUTTONS || SAMPLEMODE_ALLBUTONS)

Definition at line 86 of file main.h.

#define FAT_ON_MMC

define storage hardware MMC or ATA (comming soon...)

Definition at line 69 of file main.h.

#define ID3_EN   1

Enable ID3 Tag analysis.

Definition at line 64 of file main.h.

#define MODE_IDLE   0

Definition at line 42 of file main.h.

Referenced by handle_interface(), handle_mmc(), main(), restore_player(), and update_LCD().

#define MODE_PAUSE   3

Definition at line 45 of file main.h.

Referenced by handle_interface(), mainTimer(), restore_player(), and update_LCD().

#define MODE_PLAY   2
#define MODE_POWEROFF   5

Definition at line 47 of file main.h.

#define MODE_SLEEP   1

Definition at line 43 of file main.h.

#define MODE_STOP   4

Definition at line 46 of file main.h.

Referenced by handle_interface(), handle_mmc(), streaming(), and update_LCD().

#define PIN (   x)    ((x)-2)

Definition at line 56 of file main.h.

#define PLAY_NEXT_SONG   1

Automatically select next song when finished.

Definition at line 60 of file main.h.

Referenced by streaming().

#define PLAY_REPEAT_ALL   1

Automatically loop to start of MMC when end is reached.

Definition at line 61 of file main.h.

Referenced by streaming().

#define RECURSE_DIRECTORIES   0

Automatically recurse directories.

Definition at line 62 of file main.h.

Referenced by streaming().

#define REV   'F'

define Hardware PCB version

Definition at line 68 of file main.h.

#define SAMPLEMODE_ALLBUTONS   0

disable normal joystick functions all buttons play a sample

Definition at line 83 of file main.h.

Referenced by handle_interface().

#define SAMPLEMODE_CONTROLOUT_EN   0

Enable external signal on sample trigger while playing.

Definition at line 80 of file main.h.

#define SAMPLEMODE_CONTROLOUT_PIN   7

use this pin to signal a sample tried to play while one was already playing.

Definition at line 82 of file main.h.

Referenced by play_track_number(), and streaming().

#define SAMPLEMODE_CONTROLOUT_PORT   PORTD

use this port to signal a sample tried to play while one was already playing.

Definition at line 81 of file main.h.

Referenced by play_track_number(), and streaming().

#define SAMPLEMODE_UNINTERUPTIBLE   0

Cannot play track by number if player is currently playing.

Definition at line 79 of file main.h.

#define SCAN_JUMPTOSTART   1

Return to first song after last when searching throught songs/.

Definition at line 59 of file main.h.

Referenced by handle_interface().

#define SERIAL_ENABLE

define Dubug output on Serial port

Definition at line 71 of file main.h.

#define SERIAL_EXTENDED

define enable extra functions available on the serial port

Definition at line 72 of file main.h.

#define STAT_DISPLAY_TIME   2

number of seconds to display stats

Definition at line 53 of file main.h.

Referenced by update_LCD().

#define SW_MMC_IDENTIFY

define MMC identification method HW or SW.

Definition at line 70 of file main.h.

#define USE_EEPROM

Enable eeprom usaage.

Definition at line 100 of file main.h.


Variable Documentation

const char VERSIONINFO1[]
const char VERSIONINFO2 = __DATE__ __TIME__

tag rom with compile date and time

Definition at line 62 of file main.c.

 All Files Functions Variables Typedefs Enumerations Enumerator Defines