Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bsp/airm2m/air105/board/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ extern int __bss_end;
#define HEAP_END (void*)(0x20000000 + 0xA0000)

void rt_hw_board_init(void);
int rt_vbus_do_init(void);

#endif
38 changes: 5 additions & 33 deletions bsp/nxp/lpc/lpc43xx/M0/applications/application.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
#include <shell.h>
#endif

#ifdef RT_USING_VBUS
#include <vbus.h>
#endif

/* thread phase init */
void rt_init_thread_entry(void *parameter)
{
Expand All @@ -32,10 +28,6 @@ void rt_init_thread_entry(void *parameter)
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif
#endif

#ifdef RT_USING_VBUS
rt_vbus_do_init();
#endif
}

/*the led thread*/
Expand All @@ -45,8 +37,6 @@ static struct rt_thread led_thread;
static void led_thread_entry(void *parameter)
{
rt_device_t led_dev;
rt_device_t vbus_dev;
rt_err_t err;

rt_led_hw_init();

Expand All @@ -57,32 +47,14 @@ static void led_thread_entry(void *parameter)
return;
}

vbus_dev = rt_device_find("vecho");
if (vbus_dev == RT_NULL)
{
rt_kprintf("can not find the vbus device\n");
return;
}

err = rt_device_open(vbus_dev, RT_DEVICE_OFLAG_RDWR);
if (err != RT_EOK)
{
rt_kprintf("open vbus failed: %d\n", err);
return;
}

while (1)
{
rt_uint8_t led_value;
int len;

len = rt_device_read(vbus_dev, 0, &led_value, sizeof(led_value));
if (len <= 0)
{
rt_kprintf("vbus read err: %d, %d\n", len, rt_get_errno());
}

rt_uint8_t led_value = 1;
led_dev->write(led_dev, 1, &led_value, sizeof(led_value));
rt_thread_delay(500);
led_value = 0;
led_dev->write(led_dev, 1, &led_value, sizeof(led_value));
rt_thread_delay(500);
}
}

Expand Down
1 change: 0 additions & 1 deletion bsp/nxp/lpc/lpc43xx/M0/applications/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@ extern int __bss_end;

void rt_hw_board_init(void);
int rt_hw_board_heap_init(void);
int rt_vbus_do_init(void);

#endif
13 changes: 0 additions & 13 deletions bsp/nxp/lpc/lpc43xx/M0/applications/vbus_conf.h

This file was deleted.

67 changes: 0 additions & 67 deletions bsp/nxp/lpc/lpc43xx/M0/applications/vbus_drv.c

This file was deleted.

40 changes: 0 additions & 40 deletions bsp/nxp/lpc/lpc43xx/M0/applications/vbus_hw.h

This file was deleted.

3 changes: 0 additions & 3 deletions bsp/nxp/lpc/lpc43xx/M0/rtconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@
#define RT_LWIP_MSKADDR3 0
// </section>

#define RT_USING_VBUS
#define _RT_VBUS_RING_SZ 64
#define RT_VBUS_GUEST_VIRQ 0
// </RDTConfigurator>


Expand Down
8 changes: 0 additions & 8 deletions bsp/nxp/lpc/lpc43xx/M0/vbus_local_conf.h

This file was deleted.

33 changes: 0 additions & 33 deletions bsp/nxp/lpc/lpc43xx/M4/applications/application.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
#include <shell.h>
#endif

#ifdef RT_USING_VBUS
#include <vbus.h>
#endif

static const unsigned char _M0_CODE[] rt_section("M0_CODE") = {
// #include "M0_CODE.h"
};
Expand Down Expand Up @@ -64,10 +60,6 @@ void rt_init_thread_entry(void *parameter)
#endif
#endif

#ifdef RT_USING_VBUS
rt_vbus_do_init();
#endif

_boot_M0();
}

Expand All @@ -79,8 +71,6 @@ static void led_thread_entry(void *parameter)
{
rt_uint8_t led_value;
rt_device_t led_dev;
rt_device_t vbus_dev;
rt_err_t err;

rt_led_hw_init();

Expand All @@ -91,34 +81,11 @@ static void led_thread_entry(void *parameter)
return;
}

vbus_dev = rt_device_find("vecho");
if (vbus_dev == RT_NULL)
{
rt_kprintf("can not find the vbus device\n");
return;
}

err = rt_device_open(vbus_dev, RT_DEVICE_OFLAG_RDWR);
if (err != RT_EOK)
{
rt_kprintf("open vbus failed: %d\n", err);
return;
}

led_value = 0;
while (1)
{
int len;

led_dev->write(led_dev, 0, &led_value, sizeof(led_value));

led_value = !led_value;
len = rt_device_write(vbus_dev, 0, &led_value, sizeof(led_value));
if (len <= 0)
{
rt_kprintf("vbus write err: %d, %d\n", len, rt_get_errno());
}

rt_thread_delay(1000);
}
}
Expand Down
1 change: 0 additions & 1 deletion bsp/nxp/lpc/lpc43xx/M4/applications/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@ extern int __bss_end;

void rt_hw_board_init(void);
int rt_hw_board_heap_init(void);
int rt_vbus_do_init(void);

#endif
13 changes: 0 additions & 13 deletions bsp/nxp/lpc/lpc43xx/M4/applications/vbus_conf.h

This file was deleted.

67 changes: 0 additions & 67 deletions bsp/nxp/lpc/lpc43xx/M4/applications/vbus_drv.c

This file was deleted.

Loading
Loading