processor.h

来自「this program for sd mmc card in fat file」· C头文件 代码 · 共 34 行

H
34
字号
#include <mega32.h>

#if __CODEVISIONAVR__ < 1255
#error Minimume CodevisionAVR requered ver is: 1.25.5
#endif

#define TINY_FAT  1 /* 0 means use FULL FAT firmware for Large memory systems with FAT32 support*/
                    /* 1 means use TINY FAT firmware for low memory systems but without FAT32 support*/

#define SOCKPORT	PINB			/* Socket contact port */
#define SOCKWP		0 			/* Write protect switch (disabled in my ported ver)*/
#define SOCKINS		0 			/* Card detect switch (disabled in my ported ver)*/

/*--------------------------------------------------------------------------
/  This is SPI pins defenitions for ATmega32 or ATmega16
/  you have to set this pins currectly if you want
/  to run this codes on other AVR chips   */
 #define SPI_PORT                       PORTB	
 #define SPI_DDR                        DDRB	
 #define SPI_PIN                        PINB	
 #define SPI_DI				    6		
 #define SPI_DO				    5		
 #define SPI_Clock			  7		
 #define MMC_Chip_Select	3		
 #define SPI_SS				    4		

 #define SPI2X   0
 #define SPIF    7
 #define SPE     6
 #define MSTR    4
 #define SPR0    0
 #define SPR1    1
/*--------------------------------------------------------------------------*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?