]> git.droids-corp.org - aversive.git/commitdiff
better compilation on host
authorzer0 <zer0@carbon.local>
Sat, 9 Jan 2010 16:37:17 +0000 (17:37 +0100)
committerzer0 <zer0@carbon.local>
Sat, 9 Jan 2010 16:37:17 +0000 (17:37 +0100)
modules/comm/spi/Makefile
modules/comm/spi/spi.h

index 8f06ed2d6034f4b5d243e0c42c55b5ddaa2ddcf2..76162eed82d82a010ba6d7a1e5aa2a67109b4eb4 100644 (file)
@@ -2,7 +2,11 @@
 TARGET = spi
 
 # List C source files here. (C dependencies are automatically generated.)
+ifeq ($(HOST),avr)
 SRC = spi.c
+else
+SRC = spi_host.c
+endif
 
 ###########################################
 
index e3708093e43f7cc1b7e309a26178fca8c3489c11..fe88108a802f2967135b54e1c0ae3ff0215dc845 100644 (file)
@@ -74,10 +74,17 @@ typedef enum {
  * For more information on SPI formats, please see your CPU datasheet.
  */
 typedef enum { 
+#ifdef HOST_VERSION
+       SPI_FORMAT_0,
+       SPI_FORMAT_1,
+       SPI_FORMAT_2,
+       SPI_FORMAT_3,
+#else
        SPI_FORMAT_0 = 0x00,                  /* Sample rising  Setup falling */
        SPI_FORMAT_1 = _BV(CPHA),             /* Setup rising   Sample falling */
        SPI_FORMAT_2 = _BV(CPOL),             /* Sample falling Setup rising */
        SPI_FORMAT_3 = _BV(CPHA) | _BV(CPOL), /* Setup falling  Sample rising*/
+#endif
 } spi_format_t;