ATmega8GPSLoggerBasismodul
20131018
|
#include <avr/io.h>
Go to the source code of this file.
Macros | |
#define | SPI_Mode 1 |
#define | MMC_Write PORTB |
#define | MMC_Read PINB |
#define | MMC_Direction_REG DDRB |
#define | MMC_Disable() MMC_Write|= (1<<MMC_Chip_Select); |
#define | MMC_Enable() MMC_Write&=~(1<<MMC_Chip_Select); |
#define | SDC_PutSector mmc_write_sector |
#define | SDC_GetSector mmc_read_sector |
#define | nop() __asm__ __volatile__ ("nop" ::) |
Functions | |
unsigned char | mmc_read_byte (void) |
void | mmc_write_byte (unsigned char) |
void | mmc_read_block (unsigned char *, unsigned char *, unsigned in) |
unsigned char | mmc_init (void) |
unsigned char | mmc_read_sector (unsigned long, unsigned char *) |
unsigned char | mmc_write_sector (unsigned long, unsigned char *) |
unsigned char | mmc_write_command (unsigned char *) |
unsigned char | mmc_read_csd (unsigned char *) |
unsigned char | mmc_read_cid (unsigned char *) |
#define MMC_Direction_REG DDRB |
Definition at line 17 of file mmc.h.
Referenced by mmc_init().
#define MMC_Disable | ( | ) | MMC_Write|= (1<<MMC_Chip_Select); |
Definition at line 63 of file mmc.h.
Referenced by mmc_init(), mmc_read_block(), mmc_write_command(), and mmc_write_sector().
#define MMC_Enable | ( | ) | MMC_Write&=~(1<<MMC_Chip_Select); |
Definition at line 66 of file mmc.h.
Referenced by mmc_write_command().
#define MMC_Read PINB |
Definition at line 16 of file mmc.h.
Referenced by mmc_read_byte().
#define MMC_Write PORTB |
Definition at line 15 of file mmc.h.
Referenced by mmc_init(), mmc_read_byte(), and mmc_write_byte().
#define nop | ( | ) | __asm__ __volatile__ ("nop" ::) |
Definition at line 72 of file mmc.h.
Referenced by mmc_init().
#define SDC_GetSector mmc_read_sector |
Definition at line 70 of file mmc.h.
Referenced by AppendCluster(), CreateDirectoryEntry(), fflush_(), fgetchar_(), FindNextFreeCluster(), fseek_(), GetNextCluster(), InitFat16(), and SeekDirectoryEntry().
#define SDC_PutSector mmc_write_sector |
Definition at line 68 of file mmc.h.
Referenced by AppendCluster(), CreateDirectoryEntry(), fflush_(), FindNextFreeCluster(), and fputchar_().
unsigned char mmc_init | ( | void | ) |
Definition at line 32 of file mmc.c.
References MMC_Direction_REG, MMC_Disable, MMC_Write, mmc_write_byte(), mmc_write_command(), and nop.
Referenced by main().
void mmc_read_block | ( | unsigned char * | , |
unsigned char * | , | ||
unsigned | in | ||
) |
unsigned char mmc_read_byte | ( | void | ) |
Definition at line 135 of file mmc.c.
References MMC_Read, and MMC_Write.
Referenced by mmc_read_block(), mmc_write_command(), and mmc_write_sector().
unsigned char mmc_read_cid | ( | unsigned char * | ) |
Definition at line 309 of file mmc.c.
References mmc_read_block().
unsigned char mmc_read_csd | ( | unsigned char * | ) |
Definition at line 322 of file mmc.c.
References mmc_read_block().
unsigned char mmc_read_sector | ( | unsigned | long, |
unsigned char * | |||
) |
Definition at line 286 of file mmc.c.
References mmc_read_block().
void mmc_write_byte | ( | unsigned | char | ) |
Definition at line 166 of file mmc.c.
References MMC_Write.
Referenced by mmc_init(), mmc_write_command(), and mmc_write_sector().
unsigned char mmc_write_command | ( | unsigned char * | ) |
Definition at line 99 of file mmc.c.
References MMC_Disable, MMC_Enable, mmc_read_byte(), and mmc_write_byte().
Referenced by mmc_init(), mmc_read_block(), and mmc_write_sector().
unsigned char mmc_write_sector | ( | unsigned | long, |
unsigned char * | |||
) |
Definition at line 195 of file mmc.c.
References MMC_Disable, mmc_read_byte(), mmc_write_byte(), and mmc_write_command().