Subversion Repositories Projects

Rev

Rev 231 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 231 Rev 294
Line 1... Line 1...
1
#ifndef __SSC_H
1
#ifndef __SSC_H
2
#define __SSC_H
2
#define __SSC_H
Line -... Line 3...
-
 
3
 
Line 3... Line -...
3
 
-
 
4
 
-
 
5
//-------------------------------------- Hardware specific definitions --------------------------------------
-
 
6
 
4
#include <inttypes.h>
7
#define MMC_Write                       PORTB           //Port an der die MMC/SD-card angeschlossen ist (SPI Port)
5
 
8
#define MMC_Read                        PINB
-
 
9
#define MMC_Direction_REG       DDRB
6
#ifdef USE_FOLLOWME
10
 
7
#define SD_SWITCH   !(PINB & (1<<PINB2))
11
 
-
 
12
#ifdef USE_SDLOGGER
-
 
13
#define __MMC_INTERFACE_INVERTED                // the interface between the controller and the MMC/SD-card uses an inverting leveltranslator (transistorinverter)
-
 
14
#endif                                                                  // and therefore the signals to or from the memorycard have to be inverted.
8
#endif
15
 
-
 
16
#ifdef USE_FOLLOWME                                             // uses resitors, therefore its not inverted
9
#ifdef USE_SDLOGGER
Line -... Line 10...
-
 
10
#define SD_SWITCH   !(PINB & (1<<PINB3))
17
//#define       __MMC_INTERFACE_INVERTED        // the interface between the controller and the MMC/SD-card uses an inverting leveltranslator (transistorinverter)
11
#endif
18
#endif
12
 
19
 
13
extern void     SSC_Init(void);
20
#define SPI_DI                          6               //Port Pin that is connected to the DO of the MMC/SD-card
14
extern uint8_t  SSC_GetChar(void);
21
#define SPI_DO                          5               //Port Pin that is connected to  DI of the MMC/SD-card
15
extern void     SSC_PutChar(uint8_t);
22
#define SPI_Clock                       7               //Port Pin that is connected the CLK of the MMC/SD-card
-
 
Line 23... Line -...
23
#define SPI_SS                          4               //Slave Select is not used in SPI Master Mode, but must be defined
-
 
24
#define MMC_Chip_Select         4               //Port Pin an dem Chip Select der MMC/SD-Karte angeschlossen ist
-
 
25
 
-
 
26
 
-
 
27
//________________________________________________________________________________________________________________________________________
-
 
28
//
-
 
29
// Functions needed for accessing the sdcard.
-
 
30
//
-
 
31
//________________________________________________________________________________________________________________________________________
-
 
32
 
-
 
33
extern void                     SSC_Init(void);
-
 
34
extern u8                               SSC_GetChar (void);
-
 
35
extern void                     SSC_PutChar (u8);
-
 
36
extern void                     SSC_Enable(void);
-
 
37
extern void                     SSC_Disable(void);
-
 
38
extern void                     SSC_ClearRxFifo(void);
16
extern void     SSC_Enable(void);