@@ -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 ,
@@ -331,14 +331,14 @@ static __aligned(32) uint8_t chained_read_buf_0[8] __used __NOCACHE;
331331static __aligned (32 ) uint8_t chained_read_buf_1 [8 ] __used __NOCACHE ;
332332static __aligned (32 ) uint8_t chained_cpy_buf [10 ] __used __NOCACHE ;
333333#else
334- ZTEST_BMEM uint8_t chained_read_buf_0 [8 ];
335- ZTEST_BMEM uint8_t chained_read_buf_1 [8 ];
336- ZTEST_BMEM uint8_t chained_cpy_buf [10 ];
334+ static ZTEST_BMEM uint8_t chained_read_buf_0 [8 ];
335+ static ZTEST_BMEM uint8_t chained_read_buf_1 [8 ];
336+ static ZTEST_BMEM uint8_t chained_cpy_buf [10 ];
337337#endif /* NOCACHE_MEM */
338- ZTEST_BMEM volatile uint8_t rx_data_idx ;
339- ZTEST_BMEM uint8_t rx_buf_idx ;
338+ static ZTEST_BMEM volatile uint8_t rx_data_idx ;
339+ static ZTEST_BMEM uint8_t rx_buf_idx ;
340340
341- ZTEST_BMEM uint8_t * read_ptr ;
341+ static ZTEST_BMEM uint8_t * read_ptr ;
342342
343343static uint8_t * chained_read_buf [2 ] = {chained_read_buf_0 , chained_read_buf_1 };
344344
@@ -422,9 +422,9 @@ ZTEST_USER(uart_async_chain_read, test_chained_read)
422422#if NOCACHE_MEM
423423static __aligned (32 ) uint8_t double_buffer [2 ][12 ] __used __NOCACHE ;
424424#else
425- ZTEST_BMEM uint8_t double_buffer [2 ][12 ];
425+ static ZTEST_BMEM uint8_t double_buffer [2 ][12 ];
426426#endif /* NOCACHE_MEM */
427- ZTEST_DMEM uint8_t * next_buf = double_buffer [1 ];
427+ static ZTEST_DMEM uint8_t * next_buf = double_buffer [1 ];
428428
429429static void test_double_buffer_callback (const struct device * dev ,
430430 struct uart_event * evt , void * user_data )
@@ -497,10 +497,10 @@ ZTEST_USER(uart_async_double_buf, test_double_buffer)
497497static __aligned (32 ) uint8_t test_read_abort_rx_buf [2 ][100 ] __used __NOCACHE ;
498498static __aligned (32 ) uint8_t test_read_abort_read_buf [100 ] __used __NOCACHE ;
499499#else
500- ZTEST_BMEM uint8_t test_read_abort_rx_buf [2 ][100 ];
501- ZTEST_BMEM uint8_t test_read_abort_read_buf [100 ];
500+ static ZTEST_BMEM uint8_t test_read_abort_rx_buf [2 ][100 ];
501+ static ZTEST_BMEM uint8_t test_read_abort_read_buf [100 ];
502502#endif /* NOCACHE_MEM */
503- ZTEST_BMEM int test_read_abort_rx_cnt ;
503+ static ZTEST_BMEM int test_read_abort_rx_cnt ;
504504
505505static void test_read_abort_callback (const struct device * dev ,
506506 struct uart_event * evt , void * user_data )
@@ -613,12 +613,12 @@ ZTEST_USER(uart_async_read_abort, test_read_abort)
613613
614614}
615615
616- ZTEST_BMEM volatile size_t sent ;
617- ZTEST_BMEM volatile size_t received ;
616+ static ZTEST_BMEM volatile size_t sent ;
617+ static ZTEST_BMEM volatile size_t received ;
618618#if NOCACHE_MEM
619619static __aligned (32 ) uint8_t test_rx_buf [2 ][100 ] __used __NOCACHE ;
620620#else
621- ZTEST_BMEM uint8_t test_rx_buf [2 ][100 ];
621+ static ZTEST_BMEM uint8_t test_rx_buf [2 ][100 ];
622622#endif /* NOCACHE_MEM */
623623
624624static void test_write_abort_callback (const struct device * dev ,
@@ -776,12 +776,12 @@ ZTEST_USER(uart_async_timeout, test_forever_timeout)
776776
777777
778778#if NOCACHE_MEM
779- const uint8_t chained_write_tx_bufs [2 ][10 ] = {"Message 1" , "Message 2" };
779+ static const uint8_t chained_write_tx_bufs [2 ][10 ] = {"Message 1" , "Message 2" };
780780#else
781- ZTEST_DMEM uint8_t chained_write_tx_bufs [2 ][10 ] = {"Message 1" , "Message 2" };
781+ static ZTEST_DMEM uint8_t chained_write_tx_bufs [2 ][10 ] = {"Message 1" , "Message 2" };
782782#endif /* NOCACHE_MEM */
783- ZTEST_DMEM bool chained_write_next_buf = true;
784- ZTEST_BMEM volatile uint8_t tx_sent ;
783+ static ZTEST_DMEM bool chained_write_next_buf = true;
784+ static ZTEST_BMEM volatile uint8_t tx_sent ;
785785
786786static void test_chained_write_callback (const struct device * dev ,
787787 struct uart_event * evt , void * user_data )
@@ -863,12 +863,12 @@ static __aligned(32) uint8_t long_rx_buf[RX_LONG_BUFFER] __used __NOCACHE;
863863static __aligned (32 ) uint8_t long_rx_buf2 [RX_LONG_BUFFER ] __used __NOCACHE ;
864864static __aligned (32 ) uint8_t long_tx_buf [TX_LONG_BUFFER ] __used __NOCACHE ;
865865#else
866- ZTEST_BMEM uint8_t long_rx_buf [RX_LONG_BUFFER ];
867- ZTEST_BMEM uint8_t long_rx_buf2 [RX_LONG_BUFFER ];
868- ZTEST_BMEM uint8_t long_tx_buf [TX_LONG_BUFFER ];
866+ static ZTEST_BMEM uint8_t long_rx_buf [RX_LONG_BUFFER ];
867+ static ZTEST_BMEM uint8_t long_rx_buf2 [RX_LONG_BUFFER ];
868+ static ZTEST_BMEM uint8_t long_tx_buf [TX_LONG_BUFFER ];
869869#endif /* NOCACHE_MEM */
870- ZTEST_BMEM volatile uint8_t evt_num ;
871- ZTEST_BMEM size_t long_received [2 ];
870+ static ZTEST_BMEM volatile uint8_t evt_num ;
871+ static ZTEST_BMEM size_t long_received [2 ];
872872
873873static void test_long_buffers_callback (const struct device * dev ,
874874 struct uart_event * evt , void * user_data )
0 commit comments