From 5183ee71b76d81d2833a1febb4ed897e117e9a28 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Tue, 22 Feb 2011 17:26:40 +0000 Subject: [PATCH] examples: Updated to new part prototypes Followup on previous checkin, the board examples now use "names" when possible. Signed-off-by: Michel Pollet --- examples/board_hd77480/Makefile | 3 ++- examples/board_ledramp/Makefile | 3 ++- examples/board_ledramp/ledramp.c | 2 +- examples/board_simduino/Makefile | 3 ++- examples/board_timer_64led/Makefile | 3 ++- examples/board_timer_64led/timer_64led.c | 8 ++++---- 6 files changed, 13 insertions(+), 9 deletions(-) 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)); -- 2.20.1