@@ -24,12 +24,12 @@ K_SEM_DEFINE(rx_buf_coherency, 0, 255);
2424K_SEM_DEFINE (rx_buf_released , 0 , 1 );
2525K_SEM_DEFINE (rx_disabled , 0 , 1 );
2626
27- ZTEST_BMEM volatile bool failed_in_isr ;
27+ static ZTEST_BMEM volatile bool failed_in_isr ;
2828static ZTEST_BMEM const struct device * const uart_dev =
2929 DEVICE_DT_GET (UART_NODE );
3030
3131static void read_abort_timeout (struct k_timer * timer );
32- K_TIMER_DEFINE (read_abort_timer , read_abort_timeout , NULL );
32+ static K_TIMER_DEFINE (read_abort_timer , read_abort_timeout , NULL) ;
3333
3434
3535static void init_test (void )
@@ -100,7 +100,7 @@ struct test_data {
100100#if NOCACHE_MEM
101101static struct test_data tdata __used __NOCACHE ;
102102#else
103- ZTEST_BMEM struct test_data tdata ;
103+ static ZTEST_BMEM struct test_data tdata ;
104104#endif /* NOCACHE_MEM */
105105
106106static void test_single_read_callback (const struct device * dev ,
@@ -330,10 +330,10 @@ static __aligned(32) uint8_t chained_cpy_buf[10] __used __NOCACHE;
330330ZTEST_BMEM uint8_t chained_read_buf [2 ][8 ];
331331ZTEST_BMEM uint8_t chained_cpy_buf [10 ];
332332#endif /* NOCACHE_MEM */
333- ZTEST_BMEM volatile uint8_t rx_data_idx ;
334- ZTEST_BMEM uint8_t rx_buf_idx ;
333+ static ZTEST_BMEM volatile uint8_t rx_data_idx ;
334+ static ZTEST_BMEM uint8_t rx_buf_idx ;
335335
336- ZTEST_BMEM uint8_t * read_ptr ;
336+ static ZTEST_BMEM uint8_t * read_ptr ;
337337
338338static void test_chained_read_callback (const struct device * dev ,
339339 struct uart_event * evt , void * user_data )
@@ -417,9 +417,9 @@ ZTEST_USER(uart_async_chain_read, test_chained_read)
417417#if NOCACHE_MEM
418418static __aligned (32 ) uint8_t double_buffer [2 ][12 ] __used __NOCACHE ;
419419#else
420- ZTEST_BMEM uint8_t double_buffer [2 ][12 ];
420+ static ZTEST_BMEM uint8_t double_buffer [2 ][12 ];
421421#endif /* NOCACHE_MEM */
422- ZTEST_DMEM uint8_t * next_buf = double_buffer [1 ];
422+ static ZTEST_DMEM uint8_t * next_buf = double_buffer [1 ];
423423
424424static void test_double_buffer_callback (const struct device * dev ,
425425 struct uart_event * evt , void * user_data )
@@ -492,10 +492,10 @@ ZTEST_USER(uart_async_double_buf, test_double_buffer)
492492static __aligned (32 ) uint8_t test_read_abort_rx_buf [2 ][100 ] __used __NOCACHE ;
493493static __aligned (32 ) uint8_t test_read_abort_read_buf [100 ] __used __NOCACHE ;
494494#else
495- ZTEST_BMEM uint8_t test_read_abort_rx_buf [2 ][100 ];
496- ZTEST_BMEM uint8_t test_read_abort_read_buf [100 ];
495+ static ZTEST_BMEM uint8_t test_read_abort_rx_buf [2 ][100 ];
496+ static ZTEST_BMEM uint8_t test_read_abort_read_buf [100 ];
497497#endif /* NOCACHE_MEM */
498- ZTEST_BMEM int test_read_abort_rx_cnt ;
498+ static ZTEST_BMEM int test_read_abort_rx_cnt ;
499499
500500static void test_read_abort_callback (const struct device * dev ,
501501 struct uart_event * evt , void * user_data )
@@ -608,12 +608,12 @@ ZTEST_USER(uart_async_read_abort, test_read_abort)
608608
609609}
610610
611- ZTEST_BMEM volatile size_t sent ;
612- ZTEST_BMEM volatile size_t received ;
611+ static ZTEST_BMEM volatile size_t sent ;
612+ static ZTEST_BMEM volatile size_t received ;
613613#if NOCACHE_MEM
614614static __aligned (32 ) uint8_t test_rx_buf [2 ][100 ] __used __NOCACHE ;
615615#else
616- ZTEST_BMEM uint8_t test_rx_buf [2 ][100 ];
616+ static ZTEST_BMEM uint8_t test_rx_buf [2 ][100 ];
617617#endif /* NOCACHE_MEM */
618618
619619static void test_write_abort_callback (const struct device * dev ,
@@ -771,12 +771,12 @@ ZTEST_USER(uart_async_timeout, test_forever_timeout)
771771
772772
773773#if NOCACHE_MEM
774- const uint8_t chained_write_tx_bufs [2 ][10 ] = {"Message 1" , "Message 2" };
774+ static const uint8_t chained_write_tx_bufs [2 ][10 ] = {"Message 1" , "Message 2" };
775775#else
776- ZTEST_DMEM uint8_t chained_write_tx_bufs [2 ][10 ] = {"Message 1" , "Message 2" };
776+ static ZTEST_DMEM uint8_t chained_write_tx_bufs [2 ][10 ] = {"Message 1" , "Message 2" };
777777#endif /* NOCACHE_MEM */
778- ZTEST_DMEM bool chained_write_next_buf = true;
779- ZTEST_BMEM volatile uint8_t tx_sent ;
778+ static ZTEST_DMEM bool chained_write_next_buf = true;
779+ static ZTEST_BMEM volatile uint8_t tx_sent ;
780780
781781static void test_chained_write_callback (const struct device * dev ,
782782 struct uart_event * evt , void * user_data )
@@ -862,8 +862,8 @@ ZTEST_BMEM uint8_t long_rx_buf[RX_LONG_BUFFER];
862862ZTEST_BMEM uint8_t long_rx_buf2 [RX_LONG_BUFFER ];
863863ZTEST_BMEM uint8_t long_tx_buf [TX_LONG_BUFFER ];
864864#endif /* NOCACHE_MEM */
865- ZTEST_BMEM volatile uint8_t evt_num ;
866- ZTEST_BMEM size_t long_received [2 ];
865+ static ZTEST_BMEM volatile uint8_t evt_num ;
866+ static ZTEST_BMEM size_t long_received [2 ];
867867
868868static void test_long_buffers_callback (const struct device * dev ,
869869 struct uart_event * evt , void * user_data )
0 commit comments