From 7e774fa9945ffc50018db24aeefe0e88d10caccf Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Thu, 17 May 2012 06:14:21 +0000 Subject: hhd70 spi git-svn-id: https://svn.spreadspace.org/mur.sat@414 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/hhd70dongle/spi.c | 67 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 12 deletions(-) (limited to 'software/hhd70dongle/spi.c') diff --git a/software/hhd70dongle/spi.c b/software/hhd70dongle/spi.c index 0ffa1b9..618c581 100644 --- a/software/hhd70dongle/spi.c +++ b/software/hhd70dongle/spi.c @@ -35,7 +35,7 @@ #define SPI_DDR DDRB #define SPI_PORT PORTB -#define SPI_PIN PINB +#define SPI_PINB_REG PINB #define CS 0 #define SCK 1 #define MOSI 2 @@ -47,24 +47,67 @@ void spi_init(void) { - SPI_PORT = 0; - SPI_DDR = (1<