Commit 8ecde26308f13be0986b7d3f1ce73dec656c8194

Authored by henyxia
1 parent b8719a47

Added main view

Makefile
... ... @@ -4,7 +4,7 @@ CC_LIBS=-pthread -lusb-1.0
4 4 INCLUDES=
5 5  
6 6 SOURCES=main.c printx.c ui.c serial.c nfc.c bus.c hvc.c heat.c pump.c usb.c
7   -BMP=img/home.bmp
  7 +BMP=img/home.bmp img/main.bmp
8 8 MAP_SRC=
9 9 OBJECTS=$(SOURCES:.c=.o)
10 10 BMPR=$(BMP:.bmp=.bmpr)
... ... @@ -13,22 +13,22 @@ MAP=$(MAP_SRC:.bmp=.map)
13 13 BOZ=$(RGB:.rgb=.boz)
14 14 OUTPUT=tweekd
15 15  
16   -all: $(SOURCES) $(BOZ) $(OUTPUT)
  16 +all: $(SOURCES) $(BMP) $(OUTPUT)
17 17  
18   -$(BMPR): $(BMP)
  18 +$(OUTPUT): $(BOZ) $(OBJECTS)
  19 + $(CC) $(OBJECTS) $(CC_LIBS) -o $@
  20 +
  21 +%.o: %.c
  22 + $(CC) $(INCLUDES) $(CC_FLAGS) $< -o $@
  23 +
  24 +%.bmpr: %.bmp
19 25 convert -flip $< $@
20 26  
21   -$(RGB): $(BMPR)
  27 +%.rgb: %.bmpr
22 28 bmp2rgb565 $< $@
23 29  
24   -$(BOZ): $(RGB) $(MAP)
  30 +%.boz: %.rgb
25 31 cat $< > $@
26 32  
27   -$(OUTPUT): $(OBJECTS)
28   - $(CC) $(OBJECTS) $(CC_LIBS) -o $@
29   -
30   -%.o: %.c
31   - $(CC) $(INCLUDES) $(CC_FLAGS) $< -o $@
32   -
33 33 clear:
34 34 rm -f $(OUTPUT) $(OBJECTS) $(BOZ) $(BMPR) $(MAP) $(RGB)
... ...
img/home.bmp
No preview for this file type
img/home.xcf
No preview for this file type
img/main.bmp 0 → 100644
No preview for this file type
img/main.xcf 0 → 100644
No preview for this file type
... ... @@ -12,7 +12,7 @@ int main(void)
12 12 {
13 13 int ret;
14 14 pthread_t tUI;
15   - //pthread_t tNFC;
  15 + pthread_t tNFC;
16 16 pthread_t tBUS;
17 17 //pthread_t tHVC;
18 18 initUILog();
... ... @@ -25,13 +25,13 @@ int main(void)
25 25 printx(DEBUG, MAIN, "Creating processes\n");
26 26 ret = pthread_create(&tUI, NULL, drawUI, NULL);
27 27 printx(DEBUG, MAIN, "UI Started ID %08x ret %d\n", tUI, ret);
28   - printx(INFO, MAIN, "Initializing NFC\n");/*
  28 + printx(INFO, MAIN, "Initializing NFC\n");
29 29 if(!initNFC())
30 30 {
31 31 printx(ERROR, MAIN, "Unable to start the NFC interface\n");
32 32 return 2;
33 33 }
34   - pthread_create(&tNFC, NULL, processNFC, NULL);*/
  34 + pthread_create(&tNFC, NULL, processNFC, NULL);
35 35 if(!initBus())
36 36 {
37 37 printx(ERROR, MAIN, "Unable to start the BUS interface\n");
... ...
... ... @@ -174,4 +174,3 @@ bool initUSB(void)
174 174  
175 175 return true;
176 176 }
177   -
... ...