forked from tenbaht/sduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathno-spi.patch
More file actions
34 lines (31 loc) · 1.55 KB
/
no-spi.patch
File metadata and controls
34 lines (31 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/Makefile b/Makefile
index 24b0057..053d17b 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ CC = gcc
CFLAGS = -c -Wall -I./STM8_Routines
#CFLAGS += -DDEBUG
LDFLAGS = -g3 -lm
-SOURCES = bootloader.c hexfile.c main.c misc.c serial_comm.c spi_spidev_comm.c spi_Arduino_comm.c
+SOURCES = bootloader.c hexfile.c main.c misc.c serial_comm.c spi_Arduino_comm.c
INCLUDES = globals.h misc.h bootloader.h hexfile.h serial_comm.h spi_spidev_comm.h spi_Arduino_comm.h main.h
STM8FLASH = STM8_Routines/E_W_ROUTINEs_128K_ver_2.1.s19 STM8_Routines/E_W_ROUTINEs_128K_ver_2.0.s19 STM8_Routines/E_W_ROUTINEs_256K_ver_1.0.s19 STM8_Routines/E_W_ROUTINEs_32K_ver_1.3.s19 STM8_Routines/E_W_ROUTINEs_32K_ver_1.4.s19 STM8_Routines/E_W_ROUTINEs_128K_ver_2.2.s19 STM8_Routines/E_W_ROUTINEs_32K_ver_1.0.s19 STM8_Routines/E_W_ROUTINEs_128K_ver_2.4.s19 STM8_Routines/E_W_ROUTINEs_32K_ver_1.2.s19 STM8_Routines/E_W_ROUTINEs_32K_verL_1.0.s19 STM8_Routines/E_W_ROUTINEs_8K_verL_1.0.s19
STM8INCLUDES = $(STM8FLASH:.s19=.h)
@@ -16,6 +16,7 @@ RM = rm -fr
# add optional SPI support via spidev library (Windows not yet supported)
ifeq (,$(findstring Win,$(OS)))
CFLAGS += -DUSE_SPIDEV
+ SOURCES += spi_spidev_comm.c
endif
# add optional GPIO reset via wiringPi library (Raspberry only)
diff --git a/misc.c b/misc.c
index 9fe02a0..67b5c0d 100644
--- a/misc.c
+++ b/misc.c
@@ -22,7 +22,7 @@
// WIN32 specific
#if defined(WIN32)
- #include "Windows.h"
+ #include "windows.h"
// forground colours
#define FG_BLACK 0