From 8ecde26308f13be0986b7d3f1ce73dec656c8194 Mon Sep 17 00:00:00 2001 From: henyxia Date: Thu, 23 Apr 2015 16:04:10 +0200 Subject: [PATCH] Added main view --- Makefile | 22 +++++++++++----------- img/home.bmp | Bin 230522 -> 0 bytes img/home.xcf | Bin 136906 -> 0 bytes img/main.bmp | Bin 0 -> 230522 bytes img/main.xcf | Bin 0 -> 34928 bytes main.c | 6 +++--- usb.c | 1 - 7 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 img/main.bmp create mode 100644 img/main.xcf diff --git a/Makefile b/Makefile index dc1206e..39f83ae 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ CC_LIBS=-pthread -lusb-1.0 INCLUDES= SOURCES=main.c printx.c ui.c serial.c nfc.c bus.c hvc.c heat.c pump.c usb.c -BMP=img/home.bmp +BMP=img/home.bmp img/main.bmp MAP_SRC= OBJECTS=$(SOURCES:.c=.o) BMPR=$(BMP:.bmp=.bmpr) @@ -13,22 +13,22 @@ MAP=$(MAP_SRC:.bmp=.map) BOZ=$(RGB:.rgb=.boz) OUTPUT=tweekd -all: $(SOURCES) $(BOZ) $(OUTPUT) +all: $(SOURCES) $(BMP) $(OUTPUT) -$(BMPR): $(BMP) +$(OUTPUT): $(BOZ) $(OBJECTS) + $(CC) $(OBJECTS) $(CC_LIBS) -o $@ + +%.o: %.c + $(CC) $(INCLUDES) $(CC_FLAGS) $< -o $@ + +%.bmpr: %.bmp convert -flip $< $@ -$(RGB): $(BMPR) +%.rgb: %.bmpr bmp2rgb565 $< $@ -$(BOZ): $(RGB) $(MAP) +%.boz: %.rgb cat $< > $@ -$(OUTPUT): $(OBJECTS) - $(CC) $(OBJECTS) $(CC_LIBS) -o $@ - -%.o: %.c - $(CC) $(INCLUDES) $(CC_FLAGS) $< -o $@ - clear: rm -f $(OUTPUT) $(OBJECTS) $(BOZ) $(BMPR) $(MAP) $(RGB) diff --git a/img/home.bmp b/img/home.bmp index a98149b..4dee7ab 100644 Binary files a/img/home.bmp and b/img/home.bmp differ diff --git a/img/home.xcf b/img/home.xcf index 52819e2..aa9914b 100644 Binary files a/img/home.xcf and b/img/home.xcf differ diff --git a/img/main.bmp b/img/main.bmp new file mode 100644 index 0000000..441c9a0 Binary files /dev/null and b/img/main.bmp differ diff --git a/img/main.xcf b/img/main.xcf new file mode 100644 index 0000000..7180e3f Binary files /dev/null and b/img/main.xcf differ diff --git a/main.c b/main.c index a80ed68..ba9fbd2 100644 --- a/main.c +++ b/main.c @@ -12,7 +12,7 @@ int main(void) { int ret; pthread_t tUI; - //pthread_t tNFC; + pthread_t tNFC; pthread_t tBUS; //pthread_t tHVC; initUILog(); @@ -25,13 +25,13 @@ int main(void) printx(DEBUG, MAIN, "Creating processes\n"); ret = pthread_create(&tUI, NULL, drawUI, NULL); printx(DEBUG, MAIN, "UI Started ID %08x ret %d\n", tUI, ret); - printx(INFO, MAIN, "Initializing NFC\n");/* + printx(INFO, MAIN, "Initializing NFC\n"); if(!initNFC()) { printx(ERROR, MAIN, "Unable to start the NFC interface\n"); return 2; } - pthread_create(&tNFC, NULL, processNFC, NULL);*/ + pthread_create(&tNFC, NULL, processNFC, NULL); if(!initBus()) { printx(ERROR, MAIN, "Unable to start the BUS interface\n"); diff --git a/usb.c b/usb.c index 4455bd1..83335fb 100644 --- a/usb.c +++ b/usb.c @@ -174,4 +174,3 @@ bool initUSB(void) return true; } - -- libgit2 0.21.2