Skip to content

Commit ac7364a

Browse files
committed
[bsp][gd32]format files
1 parent a1c6405 commit ac7364a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

bsp/gd32/risc-v/gd32vw553h-eval/board/port/at24c02/at24c02.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ static int init_gd32_at24c02(void)
1515
if (gd32_at24c02 == RT_NULL)
1616
{
1717
rt_kprintf("AT24C02 initialization failed\n");
18-
return RT_ERROR;
18+
return -RT_ERROR;
1919
}
2020

2121
result = at24cxx_check(gd32_at24c02);
2222

23-
if (result == RT_ERROR)
23+
if (result == -RT_ERROR)
2424
{
2525
rt_kprintf("AT24C02 check failed\n");
26-
return RT_ERROR;
26+
return -RT_ERROR;
2727
}
2828

2929
return RT_EOK;

bsp/gd32/risc-v/gd32vw553h-eval/board/port/at24c02/test_at24c02.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static rt_err_t test_at24c02_init(void)
1818
if (dev == RT_NULL)
1919
{
2020
LOG_E("AT24C02 initialization failed\n");
21-
result = RT_ERROR;
21+
result = -RT_ERROR;
2222
}
2323

2424
return result;
@@ -43,7 +43,7 @@ static void test_at24c02_example(void)
4343
}
4444

4545
LOG_I("Successfully wrote to AT24C02: %s\n", write_buffer);
46-
46+
4747
/* 读取数据 */
4848
result = at24cxx_read(dev, 0, read_buffer, data_size);
4949

@@ -76,7 +76,7 @@ static rt_err_t test_at24c02_deinit(void)
7676
return RT_EOK;
7777
}
7878

79-
return RT_ERROR;
79+
return -RT_ERROR;
8080
}
8181

8282
static void test_case(void)

0 commit comments

Comments
 (0)