Changeset - 469487d2238c
[Not reviewed]
default
0 1 0
kripperger@CL-SEC241-09.cedarville.edu - 13 years ago 2012-11-09 17:01:46
kripperger@CL-SEC241-09.cedarville.edu
spi work
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
slave/slave/lib/spi.h
Show inline comments
 
@@ -4,25 +4,25 @@
 
 *
 
 *
 
 *
 
 */
 

	
 

	
 
#ifndef SPI_H_
 
#define SPI_H_
 

	
 
#include <avr/io.h>
 

	
 

	
 
#define SPI_SS_PIN PORTB4
 
#define SPI_SS_PIN PORTB4		//DEBUG //THIS IS WRONG FOR NOW...
 
#define SPI_SCK_PIN PORTB7
 
#define SPI_MOSI_PIN PORTB5
 
#define SPI_MISO_PIN PORTB6
 

	
 

	
 
// SPI clock modes
 
#define SPI_MODE_0 0x00 /* Sample (Rising) Setup (Falling) CPOL=0, CPHA=0 */
 
#define SPI_MODE_1 0x01 /* Setup (Rising) Sample (Falling) CPOL=0, CPHA=1 */
 
#define SPI_MODE_2 0x02 /* Sample (Falling) Setup (Rising) CPOL=1, CPHA=0 */
 
#define SPI_MODE_3 0x03 /* Setup (Falling) Sample (Rising) CPOL=1, CPHA=1 */
 

	
 
// data direction
0 comments (0 inline, 0 general)