From: Michel Pollet Date: Tue, 22 Feb 2011 17:26:40 +0000 (+0000) Subject: examples: Updated to new part prototypes X-Git-Tag: v1.0a7~21 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=5183ee71b76d81d2833a1febb4ed897e117e9a28;p=sx%2Fsimavr.git examples: Updated to new part prototypes Followup on previous checkin, the board examples now use "names" when possible. Signed-off-by: Michel Pollet --- diff --git a/examples/board_hd77480/Makefile b/examples/board_hd77480/Makefile index 04a18d5..a3ca979 100644 --- a/examples/board_hd77480/Makefile +++ b/examples/board_hd77480/Makefile @@ -44,12 +44,13 @@ atmega48_charlcd.axf: atmega48_charlcd.c include ${simavr}/Makefile.common +${board} : ${simavr}/simavr/libsimavr.a ${board} : ${OBJ}/ac_input.o ${board} : ${OBJ}/hd44780.o ${board} : ${OBJ}/hd44780_glut.o ${board} : ${OBJ}/${board}.o @echo LD $@ - @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a + @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) clean: rm -rf obj *.hex *.a *.axf ${board} *.vcd .*.swo .*.swp .*.swm .*.swn diff --git a/examples/board_ledramp/Makefile b/examples/board_ledramp/Makefile index 0ee7d25..2274a26 100644 --- a/examples/board_ledramp/Makefile +++ b/examples/board_ledramp/Makefile @@ -42,10 +42,11 @@ all: obj ${firmware} ${board} include ${simavr}/Makefile.common +${board} : ${simavr}/simavr/libsimavr.a ${board} : ${OBJ}/button.o ${board} : ${OBJ}/${board}.o @echo LD $@ - @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a + @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) clean: rm -rf obj *.hex *.a *.axf ${board} *.vcd diff --git a/examples/board_ledramp/ledramp.c b/examples/board_ledramp/ledramp.c index 5167c66..e3d0b13 100644 --- a/examples/board_ledramp/ledramp.c +++ b/examples/board_ledramp/ledramp.c @@ -159,7 +159,7 @@ int main(int argc, char *argv[]) avr_load_firmware(avr, &f); // initialize our 'peripheral' - button_init(avr, &button); + button_init(avr, &button, "button"); // "connect" the output irw of the button to the port pin of the AVR avr_connect_irq( button.irq + IRQ_BUTTON_OUT, diff --git a/examples/board_simduino/Makefile b/examples/board_simduino/Makefile index a58576f..3d5843b 100644 --- a/examples/board_simduino/Makefile +++ b/examples/board_simduino/Makefile @@ -42,11 +42,12 @@ all: obj ${firmware} ${board} include ${simavr}/Makefile.common +${board} : ${simavr}/simavr/libsimavr.a ${board} : ${OBJ}/button.o ${board} : ${OBJ}/uart_udp.o ${board} : ${OBJ}/${board}.o @echo LD $@ - @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a + @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) clean: rm -rf obj *.a *.axf ${board} *.vcd diff --git a/examples/board_timer_64led/Makefile b/examples/board_timer_64led/Makefile index 8acd495..cde8e4c 100644 --- a/examples/board_timer_64led/Makefile +++ b/examples/board_timer_64led/Makefile @@ -42,11 +42,12 @@ all: obj ${firmware} ${board} include ${simavr}/Makefile.common +${board} : ${simavr}/simavr/libsimavr.a ${board} : ${OBJ}/button.o ${board} : ${OBJ}/hc595.o ${board} : ${OBJ}/${board}.o @echo LD $@ - @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a + @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) clean: rm -rf obj *.hex *.a *.axf ${board} *.vcd diff --git a/examples/board_timer_64led/timer_64led.c b/examples/board_timer_64led/timer_64led.c index 567303c..fe838f9 100644 --- a/examples/board_timer_64led/timer_64led.c +++ b/examples/board_timer_64led/timer_64led.c @@ -229,17 +229,17 @@ int main(int argc, char *argv[]) // // initialize our 'peripherals' // - hc595_init(&shifter); + hc595_init(avr, &shifter); - button_init(avr, &button[B_START]); + button_init(avr, &button[B_START], "button.start"); avr_connect_irq( button[B_START].irq + IRQ_BUTTON_OUT, avr_io_getirq(avr, AVR_IOCTL_IOPORT_GETIRQ('C'), 0)); - button_init(avr, &button[B_STOP]); + button_init(avr, &button[B_STOP], "button.stop"); avr_connect_irq( button[B_STOP].irq + IRQ_BUTTON_OUT, avr_io_getirq(avr, AVR_IOCTL_IOPORT_GETIRQ('B'), 1)); - button_init(avr, &button[B_RESET]); + button_init(avr, &button[B_RESET], "button.reset"); avr_connect_irq( button[B_RESET].irq + IRQ_BUTTON_OUT, avr_io_getirq(avr, AVR_IOCTL_IOPORT_GETIRQ('B'), 0));