You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
			
		
		
		
		
			
		
			
				
	
	
		
			21 lines
		
	
	
		
			609 B
		
	
	
	
		
			C
		
	
			
		
		
	
	
			21 lines
		
	
	
		
			609 B
		
	
	
	
		
			C
		
	
| #ifndef _SPI_H_
 | |
| #define _SPI_H_
 | |
| 
 | |
| #include <avr/io.h>
 | |
| 
 | |
| #define SPI_PORT        PORTB	/* target-specific port containing the SPI lines */
 | |
| #define SPI_DDR         DDRB	/* target-specific DDR for the SPI port lines */
 | |
| 
 | |
| #define CS_DDR          DDRJ	/* target-specific DDR for chip-select */
 | |
| #define CS_PORT         PORTJ	/* target-specific port used as chip-select */
 | |
| #define CS_BIT          3	/* target-specific port line used as chip-select */
 | |
| 
 | |
| uint8_t spi_read();
 | |
| void spi_write(uint8_t d);
 | |
| void spi_select(void);
 | |
| void spi_deselect(void);
 | |
| unsigned char spi_xchg(unsigned char val);
 | |
| void spi_init(void);
 | |
| 
 | |
| #endif
 |