From: Michel Pollet Date: Fri, 17 Feb 2017 09:56:41 +0000 (+0000) Subject: Updated some tests to use the new VCD macros X-Git-Tag: v1.5~1 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=a37c1bed9ccc8125cd1732b214a6858391372ad0;p=sx%2Fsimavr.git Updated some tests to use the new VCD macros No functional changes Signed-off-by: Michel Pollet --- diff --git a/tests/atmega2560_uart_echo.c b/tests/atmega2560_uart_echo.c index 8931881..c2132e8 100644 --- a/tests/atmega2560_uart_echo.c +++ b/tests/atmega2560_uart_echo.c @@ -37,6 +37,8 @@ const struct avr_mmcu_vcd_trace_t _mytrace[] _MMCU_ = { { AVR_MCU_VCD_SYMBOL("UDRE3"), .mask = (1 << UDRE3), .what = (void*)&UCSR3A, }, { AVR_MCU_VCD_SYMBOL("GPIOR1"), .what = (void*)&GPIOR1, }, }; +AVR_MCU_VCD_IRQ(USART3_RX); // single bit trace +AVR_MCU_VCD_ALL_IRQ(); // also show ALL irqs running volatile uint8_t cnt = 0; volatile uint8_t done = 0; diff --git a/tests/atmega88_timer16.c b/tests/atmega88_timer16.c index 31e5327..64233e7 100644 --- a/tests/atmega88_timer16.c +++ b/tests/atmega88_timer16.c @@ -38,17 +38,17 @@ AVR_MCU(F_CPU, "atmega88"); * Opening it with gtkwave will show you the data being read & written to these * It also demonstrate how you can use unused pins to generate your own traces, with * your own events to be displayed. - * - * Here the port B first 2 bits are used to display when a tick occurs, and when a + * + * Here the port B first 2 bits are used to display when a tick occurs, and when a * TCNT reset occurs. */ const struct avr_mmcu_vcd_trace_t _mytrace[] _MMCU_ = { - { AVR_MCU_VCD_SYMBOL("TCNT1L"), .what = (void*)&TCNT1L, }, - { AVR_MCU_VCD_SYMBOL("TCNT1H"), .what = (void*)&TCNT1H, }, - { AVR_MCU_VCD_SYMBOL("tick"), .mask = (1 << 0), .what = (void*)&PORTB, }, - { AVR_MCU_VCD_SYMBOL("reset_timer"), .mask = (1 << 1), .what = (void*)&PORTB, }, - { AVR_MCU_VCD_SYMBOL("OC2A"), .mask = (1 << 3), .what = (void*)&PORTB, }, + { AVR_MCU_VCD_SYMBOL("TCNT1L"), .what = (void*)&TCNT1L, }, + { AVR_MCU_VCD_SYMBOL("TCNT1H"), .what = (void*)&TCNT1H, }, }; +AVR_MCU_VCD_PORT_PIN('B', 3, "OC2A"); +AVR_MCU_VCD_PORT_PIN('B', 1, "reset_timer"); +AVR_MCU_VCD_PORT_PIN('B', 0, "tick"); volatile uint16_t tcnt; @@ -60,7 +60,7 @@ ISR(TIMER2_COMPA_vect) // handler for Output Compare 2 overflow interrupt } int main() -{ +{ // // start the 16 bits timer, with default "normal" waveform // and no interupt enabled. This just increments TCNT1 @@ -70,7 +70,7 @@ int main() TCCR1B |= (0<