11/*
22 * File : test_driver.h
3- * Copyright (c) 2006-2018 , RT-Thread Development Team
3+ * Copyright (c) 2006-2021 , RT-Thread Development Team
44 *
55 * SPDX-License-Identifier: Apache-2.0
66 *
@@ -50,7 +50,7 @@ void test_hdmi()
5050 int i = 0 ;
5151 for (; i < 20 ; i ++ ) colors [i ] = COLOR_RED ;
5252 rt_graphix_ops (hdmi ) -> blit_line ((char * )colors , 20 , 20 , 20 );
53-
53+
5454#endif
5555}
5656
@@ -73,8 +73,8 @@ void test_cpusmp(void)
7373{
7474 rt_kprintf ("Hello Test SMP!\n" );
7575#ifdef RT_USING_SMP
76- int i ;
77- char test_name [RT_NAME_MAX ];
76+ int i ;
77+ char test_name [RT_NAME_MAX ];
7878 for (i = 0 ; i < _CPUS_NR ; i ++ )
7979 {
8080 rt_sprintf (test_name , "smp%d" , i );
@@ -162,17 +162,17 @@ void test_i2c(void)
162162 rt_kprintf ("can't find %s device!\n" , name );
163163 else
164164 {
165- read_regs (i2c_bus , 7 , buf );
166- buf [0 ] = buf [0 ]& 0x7F ; //sec
167- buf [1 ] = buf [1 ]& 0x7F ; //min
168- buf [2 ] = buf [2 ]& 0x3F ; //hour
169- buf [3 ] = buf [3 ]& 0x07 ; //week
170- buf [4 ] = buf [4 ]& 0x3F ; //day
171- buf [5 ] = buf [5 ]& 0x1F ; //mouth
172- //year/month/day
173- rt_kprintf ("20%02x-%02x-%02x " ,buf [6 ],buf [5 ],buf [4 ]);
174- //hour:minute/second
175- rt_kprintf ("%02x:%02x:%02x \n" ,buf [2 ],buf [1 ],buf [0 ]);
165+ read_regs (i2c_bus , 7 , buf );
166+ buf [0 ] = buf [0 ]& 0x7F ; //sec
167+ buf [1 ] = buf [1 ]& 0x7F ; //min
168+ buf [2 ] = buf [2 ]& 0x3F ; //hour
169+ buf [3 ] = buf [3 ]& 0x07 ; //week
170+ buf [4 ] = buf [4 ]& 0x3F ; //day
171+ buf [5 ] = buf [5 ]& 0x1F ; //mouth
172+ //year/month/day
173+ rt_kprintf ("20%02x-%02x-%02x " ,buf [6 ],buf [5 ],buf [4 ]);
174+ //hour:minute/second
175+ rt_kprintf ("%02x:%02x:%02x \n" ,buf [2 ],buf [1 ],buf [0 ]);
176176 }
177177#endif
178178}
0 commit comments