From f432df24764cee2f7d1590650eeac4f3a121f25e Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 6 May 2011 20:11:48 -0400 Subject: Updating VGA examples for use with new timer API. --- examples/vga-scope.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'examples/vga-scope.cpp') diff --git a/examples/vga-scope.cpp b/examples/vga-scope.cpp index 9aa8bcb..b5fa8a5 100644 --- a/examples/vga-scope.cpp +++ b/examples/vga-scope.cpp @@ -76,7 +76,7 @@ // set has priority, so clear every bit and set some given bits: #define VGA_COLOR(c) (*ABSRR = c | \ - BIT(RBIT+16) | BIT(GBIT+16) | BIT(BBIT+16)) + BIT(RBIT + 16) | BIT(GBIT + 16) | BIT(BBIT + 16)) #define VGA_V_HIGH *ABSRR = BIT(6) #define VGA_V_LOW *ABRR = BIT(6) @@ -116,15 +116,15 @@ void setup() { timer_pause(TIMER4); timer_set_prescaler(TIMER4, 0); - timer_set_mode(TIMER4, 1, TIMER_OUTPUTCOMPARE); - timer_set_mode(TIMER4, 2, TIMER_OUTPUTCOMPARE); - timer_set_mode(TIMER4, 3, TIMER_OUTPUTCOMPARE); - timer_set_mode(TIMER4, 4, TIMER_OUTPUTCOMPARE); + timer_set_mode(TIMER4, 1, TIMER_OUTPUT_COMPARE); + timer_set_mode(TIMER4, 2, TIMER_OUTPUT_COMPARE); + timer_set_mode(TIMER4, 3, TIMER_OUTPUT_COMPARE); + timer_set_mode(TIMER4, 4, TIMER_OUTPUT_COMPARE); timer_set_reload(TIMER4, 2287); - timer_set_compare_value(TIMER4, 1, 200); - timer_set_compare_value(TIMER4, 2, 250); - timer_set_compare_value(TIMER4, 3, 2170); // 2219 max... - timer_set_compare_value(TIMER4, 4, 1); + timer_set_compare(TIMER4, 1, 200); + timer_set_compare(TIMER4, 2, 250); + timer_set_compare(TIMER4, 3, 2170); // 2219 max... + timer_set_compare(TIMER4, 4, 1); timer_attach_interrupt(TIMER4, 1, isr_porch); timer_attach_interrupt(TIMER4, 2, isr_start); timer_attach_interrupt(TIMER4, 3, isr_stop); -- cgit v1.2.3