Skip to content

Commit 398447c

Browse files
committed
use formatting py to format code
1 parent ad97cfc commit 398447c

File tree

16 files changed

+227
-210
lines changed

16 files changed

+227
-210
lines changed

bsp/gd32/arm/gd32e230-lckfb/applications/main.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2025 RT-Thread Development Team
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -10,7 +10,7 @@
1010

1111
#include <rtthread.h>
1212
#include <rtdevice.h>
13-
#include <board.h>
13+
#include <board.h>
1414

1515

1616
#define LED_PIN BSP_LED_PIN
@@ -40,13 +40,13 @@ static void uart_send_thread_entry(void *parameter)
4040
char msg[] = "hello rt-thread\r\n";
4141

4242
console_dev = rt_console_get_device();
43-
43+
4444
if (!console_dev)
4545
{
4646
rt_kprintf("Failed to get console device.\n");
4747
return;
4848
}
49-
49+
5050
rt_kprintf("UART send thread started. Will send message every 2 seconds.\n");
5151

5252
while (1)
@@ -94,6 +94,7 @@ int main(void)
9494
{
9595
rt_kprintf("!!! FAILED to create uart_send thread. Not enough memory?\n");
9696
}
97-
97+
9898
return 0;
99-
}
99+
}
100+

bsp/gd32/arm/gd32e230-lckfb/board/board.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2025 RT-Thread Development Team
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -76,4 +76,5 @@ void rt_hw_board_init(void)
7676
#ifdef RT_USING_COMPONENTS_INIT
7777
rt_components_board_init();
7878
#endif
79-
}
79+
}
80+

bsp/gd32/arm/gd32e230-lckfb/board/board.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*
2-
* Copyright (c) 2006-2025 RT-Thread Development Team
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
66
*/
77
#ifndef __BOARD_H__
88
#define __BOARD_H__
99

10-
#include "gd32e23x.h"
11-
#include "drv_gpio.h"
10+
#include "gd32e23x.h"
11+
#include "drv_gpio.h"
1212

1313
#include "gd32e23x_exti.h"
1414

@@ -31,4 +31,5 @@ extern int __bss_end;
3131

3232
#define HEAP_END GD32_SRAM_END
3333

34-
#endif
34+
#endif
35+

bsp/gd32/arm/gd32e230-lckfb/board/gd32e23x_libopt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ OF SUCH DAMAGE.
5656
#include "gd32e23x_cmp.h"
5757

5858
#endif /* GD32E23X_LIBOPT_H */
59+

bsp/gd32/arm/gd32e230-lckfb/rtconfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,3 +410,4 @@
410410
/* end of Hardware Drivers Config */
411411

412412
#endif
413+

bsp/gd32/arm/libraries/gd32_drivers/drv_adc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2022, RT-Thread Development Team
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -35,7 +35,7 @@ struct rt_adc_device adc2;
3535
static const struct gd32_adc adc_obj[] = {
3636
#ifdef BSP_USING_ADC0
3737
{
38-
#if defined SOC_SERIES_GD32E23x
38+
#if defined SOC_SERIES_GD32E23x
3939
ADC,
4040
RCU_ADC,
4141
{
@@ -274,3 +274,4 @@ static int rt_hw_adc_init(void)
274274
}
275275
INIT_BOARD_EXPORT(rt_hw_adc_init);
276276
#endif
277+

bsp/gd32/arm/libraries/gd32_drivers/drv_adc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2022, RT-Thread Development Team
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -35,3 +35,4 @@ struct gd32_adc
3535
#endif
3636

3737
#endif /* __DRV_ADC_H__ */
38+

bsp/gd32/arm/libraries/gd32_drivers/drv_gpio.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2022, RT-Thread Development Team
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -471,6 +471,7 @@ static rt_err_t gd32_pin_attach_irq(struct rt_device *device, rt_base_t pin,
471471
rt_hw_interrupt_enable(level);
472472
return RT_EOK;
473473
}
474+
474475
if (pin_irq_hdr_tab[hdr_index].pin != -1)
475476
{
476477
rt_hw_interrupt_enable(level);
@@ -661,10 +662,10 @@ void GD32_GPIO_EXTI_IRQHandler(rt_int8_t exti_line)
661662
void EXTI0_1_IRQHandler(void)
662663
{
663664
rt_interrupt_enter();
664-
665+
665666
GD32_GPIO_EXTI_IRQHandler(0);
666667
GD32_GPIO_EXTI_IRQHandler(1);
667-
668+
668669
rt_interrupt_leave();
669670
}
670671

@@ -681,7 +682,7 @@ void EXTI2_3_IRQHandler(void)
681682
void EXTI4_15_IRQHandler(void)
682683
{
683684
rt_interrupt_enter();
684-
685+
685686
GD32_GPIO_EXTI_IRQHandler(4);
686687
GD32_GPIO_EXTI_IRQHandler(5);
687688
GD32_GPIO_EXTI_IRQHandler(6);
@@ -694,7 +695,7 @@ void EXTI4_15_IRQHandler(void)
694695
GD32_GPIO_EXTI_IRQHandler(13);
695696
GD32_GPIO_EXTI_IRQHandler(14);
696697
GD32_GPIO_EXTI_IRQHandler(15);
697-
698+
698699
rt_interrupt_leave();
699700
}
700701
#else
@@ -769,3 +770,4 @@ int rt_hw_pin_init(void)
769770
INIT_BOARD_EXPORT(rt_hw_pin_init);
770771

771772
#endif
773+

bsp/gd32/arm/libraries/gd32_drivers/drv_gpio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2022, RT-Thread Development Team
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

bsp/gd32/arm/libraries/gd32_drivers/drv_rtc.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2022, RT-Thread Development Team
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -52,8 +52,8 @@ static time_t get_rtc_timestamp(void)
5252

5353
rtc_current_time_get(&rtc_current_time);
5454

55-
tm_new.tm_year = bcd_to_bin(rtc_current_time.rtc_year) + 100; // tm_year: years since 1900
56-
tm_new.tm_mon = bcd_to_bin(rtc_current_time.rtc_month) - 1; // tm_mon: month (0 = January, 11 = December)
55+
tm_new.tm_year = bcd_to_bin(rtc_current_time.rtc_year) + 100; /* tm_year: years since 1900 */
56+
tm_new.tm_mon = bcd_to_bin(rtc_current_time.rtc_month) - 1; /* tm_mon: month (0 = January, 11 = December) */
5757
tm_new.tm_mday = bcd_to_bin(rtc_current_time.rtc_date);
5858
tm_new.tm_hour = bcd_to_bin(rtc_current_time.rtc_hour);
5959
tm_new.tm_min = bcd_to_bin(rtc_current_time.rtc_minute);
@@ -78,7 +78,7 @@ static rt_err_t set_rtc_timestamp(time_t time_stamp)
7878
p_tm = gmtime(&time_stamp);
7979

8080
/* GD32 RTC uses year starting from 2000; thus tm_year must be at least 100 (i.e., 2000 - 1900) */
81-
81+
8282
if (p_tm->tm_year < 100)
8383
{
8484
return -RT_ERROR;
@@ -223,3 +223,4 @@ static int rt_hw_rtc_init(void)
223223
}
224224
INIT_DEVICE_EXPORT(rt_hw_rtc_init);
225225
#endif
226+

0 commit comments

Comments
 (0)