Add voltmeter1
This commit is contained in:
@@ -16,7 +16,7 @@ all: ir_uart_test3.out
|
||||
|
||||
|
||||
# Compile: create object files from C source files.
|
||||
ir_uart_test3.o: ir_uart_test3.c ../../drivers/avr/ir_uart.h ../../drivers/avr/system.h ../../drivers/display.h ../../drivers/navswitch.h ../../fonts/font5x7_1.h ../../utils/font.h ../../utils/pacer.h ../../utils/tinygl.h ../../utils/uint8toa.h
|
||||
ir_uart_test3.o: ir_uart_test3.c ../../drivers/avr/ir_uart.h ../../drivers/avr/system.h ../../drivers/display.h ../../drivers/navswitch.h ../../fonts/font3x5_1.h ../../utils/font.h ../../utils/pacer.h ../../utils/tinygl.h ../../utils/uint8toa.h
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
ir_uart.o: ../../drivers/avr/ir_uart.c ../../drivers/avr/ir_uart.h ../../drivers/avr/pio.h ../../drivers/avr/system.h ../../drivers/avr/timer0.h ../../drivers/avr/usart1.h
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
# Date: 11 Sep 2010
|
||||
# Descr: Makefile for ir_uart_test3 docs
|
||||
|
||||
# The scripts used to make the graphs require the program dot; this
|
||||
# is part of the graphviz package.
|
||||
|
||||
DEL = rm
|
||||
|
||||
all: file_dependencies.pdf module_dependencies.pdf makefile_dependencies.pdf build_dependencies.pdf callgraph.pdf
|
||||
@@ -11,7 +14,7 @@ file_dependencies.pdf: files.d
|
||||
../../../etc/graphdeps.py $< --out $@
|
||||
|
||||
module_dependencies.pdf: modules.d
|
||||
../../../etc/graphdeps.py $< --modules --out $@
|
||||
../../../etc/graphdeps.py $< --modules --rotate --out $@
|
||||
|
||||
makefile_dependencies.pdf: ../Makefile
|
||||
../../../etc/graphdeps.py $< --out $@
|
||||
|
||||
@@ -22,6 +22,8 @@ [email protected]:
|
||||
|
||||
tinygl_text_mode_set@tinygl.c:
|
||||
|
||||
tinygl_text_dir_set@tinygl.c:
|
||||
|
||||
navswitch_init@navswitch.c:
|
||||
|
||||
timer0_mode_set@timer0.c:
|
||||
@@ -52,11 +54,13 @@ [email protected]:
|
||||
|
||||
pacer_init@pacer.c: timer_init
|
||||
|
||||
uint8toa@uint8toa.c:
|
||||
|
||||
tinygl_draw_message@tinygl.c: strncpy strlen
|
||||
|
||||
tinygl_text@tinygl.c: tinygl_draw_message
|
||||
|
||||
show_char@ir_uart_test3.c: tinygl_text
|
||||
show_byte@ir_uart_test3.c: uint8toa tinygl_text
|
||||
|
||||
timer_get@timer.c:
|
||||
|
||||
@@ -90,6 +94,14 @@ [email protected]: ledmat_display_column
|
||||
|
||||
tinygl_update@tinygl.c: tinygl_text_advance display_update
|
||||
|
||||
usart1_read_ready_p@usart1.c:
|
||||
|
||||
ir_uart_read_ready_p@ir_uart.c: usart1_read_ready_p
|
||||
|
||||
usart1_getc@usart1.c: usart1_read_ready_p
|
||||
|
||||
ir_uart_getc@ir_uart.c: usart1_getc
|
||||
|
||||
pio_config_get@pio.c:
|
||||
|
||||
_delay_loop_1@navswitch.c:
|
||||
@@ -102,17 +114,9 @@ [email protected]:
|
||||
|
||||
usart1_write_ready_p@usart1.c:
|
||||
|
||||
usart1_putc@usart1.c: usart1_putc usart1_write_ready_p
|
||||
usart1_putc@usart1.c: usart1_write_ready_p
|
||||
|
||||
ir_uart_putc@ir_uart.c: usart1_putc
|
||||
|
||||
usart1_read_ready_p@usart1.c:
|
||||
|
||||
ir_uart_read_ready_p@ir_uart.c: usart1_read_ready_p
|
||||
|
||||
usart1_getc@usart1.c: usart1_read_ready_p
|
||||
|
||||
ir_uart_getc@ir_uart.c: usart1_getc
|
||||
|
||||
main@ir_uart_test3.c: system_init tinygl_init tinygl_font_set tinygl_text_speed_set tinygl_text_mode_set navswitch_init ir_uart_init pacer_init show_char pacer_wait tinygl_update navswitch_update navswitch_push_event_p ir_uart_putc navswitch_push_event_p ir_uart_putc ir_uart_read_ready_p ir_uart_getc show_char
|
||||
main@ir_uart_test3.c: system_init tinygl_init tinygl_font_set tinygl_text_speed_set tinygl_text_mode_set tinygl_text_dir_set navswitch_init ir_uart_init pacer_init show_byte pacer_wait tinygl_update ir_uart_read_ready_p ir_uart_getc show_byte navswitch_update navswitch_push_event_p ir_uart_putc ir_uart_getc navswitch_push_event_p ir_uart_putc ir_uart_getc
|
||||
|
||||
|
||||
@@ -14,32 +14,32 @@
|
||||
|
||||
../../drivers/navswitch.h:
|
||||
|
||||
../../drivers/avr/delay.h:
|
||||
|
||||
../../drivers/navswitch.c: ../../drivers/navswitch.h ../../drivers/avr/delay.h ../../drivers/avr/pio.h
|
||||
|
||||
../../drivers/navswitch.o: ../../drivers/navswitch.c
|
||||
|
||||
../../drivers/display.h:
|
||||
|
||||
../../utils/font.h:
|
||||
|
||||
../../utils/tinygl.h: ../../drivers/display.h ../../utils/font.h
|
||||
|
||||
../../utils/tinygl.c: ../../utils/tinygl.h ../../drivers/display.h ../../utils/font.h
|
||||
|
||||
../../utils/tinygl.o: ../../utils/tinygl.c
|
||||
|
||||
../../utils/pacer.h:
|
||||
|
||||
../../utils/uint8toa.h:
|
||||
|
||||
../../drivers/avr/ir_uart.h:
|
||||
|
||||
../../fonts/font5x7_1.h: ../../utils/font.h
|
||||
../../fonts/font3x5_1.h: ../../utils/font.h
|
||||
|
||||
ir_uart_test3.c: ../../drivers/navswitch.h ../../utils/tinygl.h ../../utils/pacer.h ../../drivers/avr/ir_uart.h ../../fonts/font5x7_1.h
|
||||
ir_uart_test3.c: ../../drivers/navswitch.h ../../utils/tinygl.h ../../utils/pacer.h ../../utils/uint8toa.h ../../drivers/avr/ir_uart.h ../../fonts/font3x5_1.h
|
||||
|
||||
ir_uart_test3.o: ir_uart_test3.c
|
||||
|
||||
../../utils/uint8toa.c:
|
||||
|
||||
../../utils/uint8toa.o: ../../utils/uint8toa.c
|
||||
|
||||
../../utils/tinygl.c: ../../utils/tinygl.h ../../drivers/display.h ../../utils/font.h
|
||||
|
||||
../../utils/tinygl.o: ../../utils/tinygl.c
|
||||
|
||||
../../utils/font.c: ../../utils/font.h
|
||||
|
||||
../../utils/font.o: ../../utils/font.c
|
||||
@@ -84,5 +84,11 @@ ir_uart_test3.o: ir_uart_test3.c
|
||||
|
||||
../../drivers/avr/usart1.o: ../../drivers/avr/usart1.c
|
||||
|
||||
ir_uart_test3.out: ../../drivers/avr/timer.o ../../drivers/ledmat.o ../../drivers/navswitch.o ../../utils/tinygl.o ir_uart_test3.o ../../utils/font.o ../../drivers/avr/pio.o ../../utils/pacer.o ../../drivers/display.o ../../drivers/avr/system.o ../../drivers/avr/prescale.o ../../drivers/avr/ir_uart.o ../../drivers/avr/timer0.o ../../drivers/avr/usart1.o
|
||||
../../drivers/avr/delay.h:
|
||||
|
||||
../../drivers/navswitch.c: ../../drivers/navswitch.h ../../drivers/avr/delay.h ../../drivers/avr/pio.h
|
||||
|
||||
../../drivers/navswitch.o: ../../drivers/navswitch.c
|
||||
|
||||
ir_uart_test3.out: ../../drivers/avr/timer.o ../../drivers/ledmat.o ir_uart_test3.o ../../utils/uint8toa.o ../../utils/tinygl.o ../../utils/font.o ../../drivers/avr/pio.o ../../utils/pacer.o ../../drivers/display.o ../../drivers/avr/system.o ../../drivers/avr/prescale.o ../../drivers/avr/ir_uart.o ../../drivers/avr/timer0.o ../../drivers/avr/usart1.o ../../drivers/navswitch.o
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ timer:
|
||||
|
||||
pacer: timer
|
||||
|
||||
uint8toa:
|
||||
|
||||
usart1:
|
||||
|
||||
prescale:
|
||||
@@ -22,5 +24,5 @@ timer0: prescale
|
||||
|
||||
ir_uart: usart1 timer0 pio
|
||||
|
||||
ir_uart_test3: navswitch tinygl pacer ir_uart
|
||||
ir_uart_test3: navswitch tinygl pacer uint8toa ir_uart
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
/* Define polling rate in Hz. */
|
||||
#define LOOP_RATE 300
|
||||
|
||||
#define SWITCH_POLL_RATE 20
|
||||
|
||||
/* Define text update rate (characters per 10 s). */
|
||||
#define MESSAGE_RATE 10
|
||||
|
||||
@@ -61,8 +63,20 @@ int main (void)
|
||||
|
||||
tinygl_update ();
|
||||
|
||||
if (ir_uart_read_ready_p ())
|
||||
{
|
||||
uint8_t data;
|
||||
|
||||
data = ir_uart_getc ();
|
||||
|
||||
/* Note, if messages come in too fast, say due to IR
|
||||
inteference from fluorescent lights, then the display
|
||||
will not keep up and will appear to freeze. */
|
||||
show_byte (data);
|
||||
}
|
||||
|
||||
count++;
|
||||
if (count > 20)
|
||||
if (count > LOOP_RATE / SWITCH_POLL_RATE)
|
||||
{
|
||||
count = 0;
|
||||
|
||||
@@ -82,18 +96,6 @@ int main (void)
|
||||
ir_uart_getc ();
|
||||
}
|
||||
}
|
||||
|
||||
if (ir_uart_read_ready_p ())
|
||||
{
|
||||
uint8_t data;
|
||||
|
||||
data = ir_uart_getc ();
|
||||
|
||||
/* Note, if messages come in too fast, say due to IR
|
||||
inteference from fluorescent lights, then the display
|
||||
will not keep up and will appear to freeze. */
|
||||
show_byte (data);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user