ButterflyMP3

eeprom.h File Reference

AVR Butterfly EEPROM routines Target ATmega169. More...

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

Go to the source code of this file.

Functions

void LoadEEPROM (uint8 *pBuffer, uint8 num_bytes, unsigned int EE_START_ADR)
void StoreEEPROM (uint8 *pBuffer, uint8 num_bytes, unsigned int EE_START_ADR)
uint8 ReadEEPROM (unsigned int EE_START_ADR)
void save_player_state (void)
 save_player_state
void save_player_options (void)
 save_player_options
void load_player_state (uint8 *mode, uint32 *file, uint32 *sector, uint32 *played, uint16 *time, uint32 *dir)
 load_player_state
void load_player_options (void)
 load_player_options
uint8 findCurrentEepromAddr (uint16 index_buffer)
 findCurrentEepromAddr

Detailed Description

AVR Butterfly EEPROM routines Target ATmega169.

Author:
ATMEL Norway Compiler....: AVR-GCC 3.3.1; avr-libc 1.0

Revisions...: 1.0

Id:
eeprom.h,v 1.6 2007/12/16 18:42:22 brokentoaster Exp

YYYYMMDD - VER. - COMMENT - SIGN.

20030116 - 1.0 - Created - LHM 20031009 port to avr-gcc/avr-libc - M.Thomas

Definition in file eeprom.h.


Function Documentation

uint8 findCurrentEepromAddr ( uint16  index_buffer)

findCurrentEepromAddr

index_buffer uint16 pointing to buffer index of interest

Returns:
index to last used entry in buffer

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

void LoadEEPROM ( uint8 pBuffer,
uint8  num_bytes,
unsigned int  EE_START_ADR 
)

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

void StoreEEPROM ( uint8 pBuffer,
uint8  num_bytes,
unsigned int  EE_START_ADR 
)

Definition at line 55 of file eeprom.c.

Referenced by save_player_options(), and save_player_state().

 All Files Functions Variables Typedefs Enumerations Enumerator Defines