Skip to content

Commit c631b39

Browse files
[Components] Remove vbus component and realview-a8-vmm libcpu (#10863)
* Initial plan * Remove vbus component and related code Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com>
1 parent 96a125c commit c631b39

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5
-4537
lines changed

bsp/airm2m/air105/board/board.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@ extern int __bss_end;
2828
#define HEAP_END (void*)(0x20000000 + 0xA0000)
2929

3030
void rt_hw_board_init(void);
31-
int rt_vbus_do_init(void);
3231

3332
#endif

bsp/nxp/lpc/lpc43xx/M0/applications/application.c

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
#include <shell.h>
1919
#endif
2020

21-
#ifdef RT_USING_VBUS
22-
#include <vbus.h>
23-
#endif
24-
2521
/* thread phase init */
2622
void rt_init_thread_entry(void *parameter)
2723
{
@@ -32,10 +28,6 @@ void rt_init_thread_entry(void *parameter)
3228
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
3329
#endif
3430
#endif
35-
36-
#ifdef RT_USING_VBUS
37-
rt_vbus_do_init();
38-
#endif
3931
}
4032

4133
/*the led thread*/
@@ -45,8 +37,6 @@ static struct rt_thread led_thread;
4537
static void led_thread_entry(void *parameter)
4638
{
4739
rt_device_t led_dev;
48-
rt_device_t vbus_dev;
49-
rt_err_t err;
5040

5141
rt_led_hw_init();
5242

@@ -57,32 +47,14 @@ static void led_thread_entry(void *parameter)
5747
return;
5848
}
5949

60-
vbus_dev = rt_device_find("vecho");
61-
if (vbus_dev == RT_NULL)
62-
{
63-
rt_kprintf("can not find the vbus device\n");
64-
return;
65-
}
66-
67-
err = rt_device_open(vbus_dev, RT_DEVICE_OFLAG_RDWR);
68-
if (err != RT_EOK)
69-
{
70-
rt_kprintf("open vbus failed: %d\n", err);
71-
return;
72-
}
73-
7450
while (1)
7551
{
76-
rt_uint8_t led_value;
77-
int len;
78-
79-
len = rt_device_read(vbus_dev, 0, &led_value, sizeof(led_value));
80-
if (len <= 0)
81-
{
82-
rt_kprintf("vbus read err: %d, %d\n", len, rt_get_errno());
83-
}
84-
52+
rt_uint8_t led_value = 1;
53+
led_dev->write(led_dev, 1, &led_value, sizeof(led_value));
54+
rt_thread_delay(500);
55+
led_value = 0;
8556
led_dev->write(led_dev, 1, &led_value, sizeof(led_value));
57+
rt_thread_delay(500);
8658
}
8759
}
8860

bsp/nxp/lpc/lpc43xx/M0/applications/board.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,5 @@ extern int __bss_end;
5050

5151
void rt_hw_board_init(void);
5252
int rt_hw_board_heap_init(void);
53-
int rt_vbus_do_init(void);
5453

5554
#endif

bsp/nxp/lpc/lpc43xx/M0/applications/vbus_conf.h

Lines changed: 0 additions & 13 deletions
This file was deleted.

bsp/nxp/lpc/lpc43xx/M0/applications/vbus_drv.c

Lines changed: 0 additions & 67 deletions
This file was deleted.

bsp/nxp/lpc/lpc43xx/M0/applications/vbus_hw.h

Lines changed: 0 additions & 40 deletions
This file was deleted.

bsp/nxp/lpc/lpc43xx/M0/rtconfig.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,6 @@
220220
#define RT_LWIP_MSKADDR3 0
221221
// </section>
222222

223-
#define RT_USING_VBUS
224-
#define _RT_VBUS_RING_SZ 64
225-
#define RT_VBUS_GUEST_VIRQ 0
226223
// </RDTConfigurator>
227224

228225

bsp/nxp/lpc/lpc43xx/M0/vbus_local_conf.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

bsp/nxp/lpc/lpc43xx/M4/applications/application.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
#include <shell.h>
1919
#endif
2020

21-
#ifdef RT_USING_VBUS
22-
#include <vbus.h>
23-
#endif
24-
2521
static const unsigned char _M0_CODE[] rt_section("M0_CODE") = {
2622
// #include "M0_CODE.h"
2723
};
@@ -64,10 +60,6 @@ void rt_init_thread_entry(void *parameter)
6460
#endif
6561
#endif
6662

67-
#ifdef RT_USING_VBUS
68-
rt_vbus_do_init();
69-
#endif
70-
7163
_boot_M0();
7264
}
7365

@@ -79,8 +71,6 @@ static void led_thread_entry(void *parameter)
7971
{
8072
rt_uint8_t led_value;
8173
rt_device_t led_dev;
82-
rt_device_t vbus_dev;
83-
rt_err_t err;
8474

8575
rt_led_hw_init();
8676

@@ -91,34 +81,11 @@ static void led_thread_entry(void *parameter)
9181
return;
9282
}
9383

94-
vbus_dev = rt_device_find("vecho");
95-
if (vbus_dev == RT_NULL)
96-
{
97-
rt_kprintf("can not find the vbus device\n");
98-
return;
99-
}
100-
101-
err = rt_device_open(vbus_dev, RT_DEVICE_OFLAG_RDWR);
102-
if (err != RT_EOK)
103-
{
104-
rt_kprintf("open vbus failed: %d\n", err);
105-
return;
106-
}
107-
10884
led_value = 0;
10985
while (1)
11086
{
111-
int len;
112-
11387
led_dev->write(led_dev, 0, &led_value, sizeof(led_value));
114-
11588
led_value = !led_value;
116-
len = rt_device_write(vbus_dev, 0, &led_value, sizeof(led_value));
117-
if (len <= 0)
118-
{
119-
rt_kprintf("vbus write err: %d, %d\n", len, rt_get_errno());
120-
}
121-
12289
rt_thread_delay(1000);
12390
}
12491
}

bsp/nxp/lpc/lpc43xx/M4/applications/board.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,5 @@ extern int __bss_end;
5050

5151
void rt_hw_board_init(void);
5252
int rt_hw_board_heap_init(void);
53-
int rt_vbus_do_init(void);
5453

5554
#endif

0 commit comments

Comments
 (0)