ButterflyMP3
|
AVR Butterfly EEPROM routines. More...
#include <avr/io.h>
#include <avr/pgmspace.h>
#include "types.h"
#include "eeprom.h"
#include "eeprom169.h"
#include "main.h"
#include "uart.h"
Go to the source code of this file.
Functions | |
void | StoreEEPROM (uint8 *pBuffer, uint8 num_bytes, unsigned int EE_START_ADR) |
void | LoadEEPROM (uint8 *pBuffer, uint8 num_bytes, unsigned int EE_START_ADR) |
uint8 | ReadEEPROM (unsigned int EE_START_ADR) |
uint8 | findCurrentEepromAddr (uint16 index_buffer) |
findCurrentEepromAddr | |
void | save_player_options (void) |
save_player_options | |
void | save_player_state (void) |
save_player_state | |
void | load_player_options (void) |
load_player_options | |
void | load_player_state (uint8 *mode, uint32 *file, uint32 *sector, uint32 *played, uint16 *time, uint32 *dir) |
load_player_state | |
Variables | |
uint8 | gmusic_vol |
music volume. | |
uint8 | gbass_boost |
bass boost off. | |
uint8 | gMode |
mode of player, idle, playing, off, etc | |
uint32 | gFAT_entry |
global current entry number in FAT table. (aka file number) | |
uint32 | gCluster |
current cluster in song | |
uint32 | gFileSectorsPlayed |
number of full sectors played. (aka position) | |
uint32 | FAT16_dir_first_sector |
volatile uint16 | gPlayTimeSeconds |
# of seconds current file has been playing. |
AVR Butterfly EEPROM routines.
Target ATmega169 Compiler....: AVR-GCC 3.3.1; avr-libc 1.0 Revisions...: 1.0
YYYYMMDD - VER. - COMMENT - SIGN. 20030116 - 1.0 - Created - LHM 20031009 port to avr-gcc/avr-libc - M.Thomas
Definition in file eeprom.c.
findCurrentEepromAddr
index_buffer uint16 pointing to buffer index of interest
0Finds the last used entry in a ring buffer
Definition at line 113 of file eeprom.c.
References EEPROM_BFFRSZE, and ReadEEPROM().
Referenced by load_player_options(), load_player_state(), save_player_options(), and save_player_state().
void load_player_options | ( | void | ) |
load_player_options
load current state of player from eeprom
Definition at line 255 of file eeprom.c.
References EEPROM_OPTIONS_INDEX, EEPROM_VOL, findCurrentEepromAddr(), gmusic_vol, and LoadEEPROM().
Referenced by init_HW().
void load_player_state | ( | uint8 * | mode, |
uint32 * | file, | ||
uint32 * | sector, | ||
uint32 * | played, | ||
uint16 * | time, | ||
uint32 * | dir | ||
) |
load_player_state
load current state of player from eeprom
Definition at line 282 of file eeprom.c.
References EEPROM_DIR, EEPROM_FILE, EEPROM_MODE, EEPROM_PLAYED, EEPROM_SECTOR, EEPROM_STATE_INDEX, EEPROM_TIME, findCurrentEepromAddr(), and LoadEEPROM().
Referenced by restore_player().
Definition at line 77 of file eeprom.c.
Referenced by load_player_options(), load_player_state(), and save_player_options().
uint8 ReadEEPROM | ( | unsigned int | EE_START_ADR | ) |
Definition at line 98 of file eeprom.c.
Referenced by findCurrentEepromAddr(), save_player_options(), and save_player_state().
void save_player_options | ( | void | ) |
save_player_options
Save current state of player to eeprom
Definition at line 148 of file eeprom.c.
References EEPROM_BFFRSZE, EEPROM_OPTIONS_INDEX, EEPROM_VOL, findCurrentEepromAddr(), gmusic_vol, LoadEEPROM(), ReadEEPROM(), and StoreEEPROM().
Referenced by mainTimer(), and Power_off().
void save_player_state | ( | void | ) |
save_player_state
Save current state of player to eeprom
Definition at line 201 of file eeprom.c.
References EEPROM_BFFRSZE, EEPROM_DIR, EEPROM_FILE, EEPROM_MODE, EEPROM_PLAYED, EEPROM_SECTOR, EEPROM_STATE_INDEX, EEPROM_TIME, FAT16_dir_first_sector, findCurrentEepromAddr(), gCluster, gFAT_entry, gFileSectorsPlayed, gMode, gPlayTimeSeconds, ReadEEPROM(), and StoreEEPROM().
Referenced by mainTimer(), and Power_off().
Definition at line 55 of file eeprom.c.
Referenced by save_player_options(), and save_player_state().
Definition at line 84 of file avrfat16.h.
Referenced by cue_file(), FAT_initFat16(), FAT_scanDir_lba(), handle_interface(), play_track_number(), save_player_state(), and streaming().
bass boost off.
Definition at line 71 of file main.c.
Referenced by flush_decoder(), and update_LCD().
global current entry number in FAT table. (aka file number)
Definition at line 78 of file main.c.
Referenced by cue_file(), handle_interface(), handle_mmc(), init_mmc_fat(), open_Dir(), play_track_number(), restore_player(), save_player_state(), streaming(), and update_LCD().
number of full sectors played. (aka position)
Definition at line 81 of file main.c.
Referenced by cue_file(), restore_player(), save_player_state(), and streaming().
music volume.
Definition at line 70 of file main.c.
Referenced by flush_decoder(), init_HW(), load_player_options(), save_player_options(), update_LCD(), volume_down(), and volume_up().
volatile uint16 gPlayTimeSeconds |