File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
tests/recipes/single-baremetal/src Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,23 +20,23 @@ void test_interrupt_timer_callback();
2020void uart_rx_handler ();
2121
2222
23- bool irq_en_timer = false;
24- bool irq_en_uart = false;
23+ volatile bool irq_en_timer = false;
24+ volatile bool irq_en_uart = false;
2525
2626#define TIMER_INTERVAL (TIME_MS(100))
2727#define TEST_TIME_WAIT (TIME_MS(100))
2828#define TEST_TIMEOUT "200"
2929
30- BAO_TEST (IRQ_CHECK , TIMER )
30+ BAO_TEST (IRQ_CHECK1 , TIMER )
3131{
3232 COMMAND_SEND_TIMEOUT (TEST_TIMEOUT );
3333
3434 irq_set_handler (TIMER_IRQ_ID , test_interrupt_timer_callback );
35- irq_enable (TIMER_IRQ_ID );
3635 timer_set (TIMER_INTERVAL );
36+ irq_enable (TIMER_IRQ_ID );
3737 irq_set_prio (TIMER_IRQ_ID , IRQ_MAX_PRIO );
3838
39- timer_wait ( TEST_TIME_WAIT );
39+ while (! irq_en_timer );
4040 EXPECTED_TRUE (irq_en_timer );
4141}
4242
You can’t perform that action at this time.
0 commit comments