usb_net编译
This commit is contained in:
11
.vscode/c_cpp_properties.json
vendored
11
.vscode/c_cpp_properties.json
vendored
@@ -30,14 +30,17 @@
|
||||
"Project/Src/rt-thread/include",
|
||||
"Project/Src/zlib",
|
||||
"Project/Src/NES",
|
||||
"Project/Src/TinyUSB/examples/device/cdc_dual_ports/src",
|
||||
"Project/Src/TinyUSB/src/class/cdc",
|
||||
"Project/Src/TinyUSB/examples/device/net_lwip_webserver/src",
|
||||
"Project/Src/TinyUSB/src/class/net",
|
||||
"Project/Src/TinyUSB/src/common",
|
||||
"Project/Src/TinyUSB/src/device",
|
||||
"Project/Src/TinyUSB/src/portable/synopsys/dwc2",
|
||||
"Project/Src/TinyUSB/src",
|
||||
"Project/Src/TinyUSB/src/osal",
|
||||
"Project/Src/TinyUSB/hw"
|
||||
"Project/Src/TinyUSB/hw",
|
||||
"Project/Src/TinyUSB/lib/networking",
|
||||
"Project/Src/rt-thread/components/net/lwip-2.1.0/src/include",
|
||||
"Project/Src/rt-thread/components/net/lwip-2.1.0/src/arch/include"
|
||||
],
|
||||
"defines": [
|
||||
"USE_STDPERIPH_DRIVER",
|
||||
@@ -51,7 +54,7 @@
|
||||
"PKG_TINYUSB_DEVICE_ENABLE"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.22621.0",
|
||||
"compilerPath": "D:/Program Files/arm-gnu-toolchain/bin/arm-none-eabi-gcc",
|
||||
"compilerPath": "C:/ARM_GCC/bin/arm-none-eabi-gcc",
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++17",
|
||||
"intelliSenseMode": "windows-gcc-arm"
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,9 @@
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#include HTTPD_FSDATA_FILE
|
||||
// #include HTTPD_FSDATA_FILE
|
||||
#include "fsdata.txt"
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
|
@@ -27,7 +27,7 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2012-12-8 Bernard add file header
|
||||
* export bsd socket symbol for RT-Thread Application Module
|
||||
* export bsd socket symbol for RT-Thread Application Module
|
||||
* 2017-11-15 Bernard add lock for init_done callback.
|
||||
* 2018-11-02 MurphyZhao port to lwip2.1.0
|
||||
*/
|
||||
@@ -52,6 +52,8 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Initialize the network interface device
|
||||
*
|
||||
@@ -213,6 +215,8 @@ int lwip_system_init(void)
|
||||
}
|
||||
INIT_PREV_EXPORT(lwip_system_init);
|
||||
|
||||
#endif
|
||||
|
||||
void sys_init(void)
|
||||
{
|
||||
/* nothing on RT-Thread porting */
|
||||
@@ -220,7 +224,7 @@ void sys_init(void)
|
||||
|
||||
void lwip_sys_init(void)
|
||||
{
|
||||
lwip_system_init();
|
||||
// lwip_system_init();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -272,7 +276,7 @@ void sys_sem_signal(sys_sem_t *sem)
|
||||
*
|
||||
* @return If the timeout argument is non-zero, it will return the number of milliseconds
|
||||
* spent waiting for the semaphore to be signaled; If the semaphore isn't signaled
|
||||
* within the specified time, it will return SYS_ARCH_TIMEOUT; If the thread doesn't
|
||||
* within the specified time, it will return SYS_ARCH_TIMEOUT; If the thread doesn't
|
||||
* wait for the semaphore, it will return zero
|
||||
*/
|
||||
u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
|
||||
@@ -553,7 +557,7 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
|
||||
return SYS_ARCH_TIMEOUT;
|
||||
else
|
||||
{
|
||||
if (ret == RT_EOK)
|
||||
if (ret == RT_EOK)
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
struct eth_device
|
||||
{
|
||||
/* inherit from rt_device */
|
||||
struct rt_device parent;
|
||||
// struct rt_device parent;
|
||||
|
||||
/* network interface for lwip */
|
||||
struct netif *netif;
|
||||
@@ -29,8 +29,8 @@ struct eth_device
|
||||
rt_uint8_t link_status;
|
||||
|
||||
/* eth device interface */
|
||||
struct pbuf* (*eth_rx)(rt_device_t dev);
|
||||
rt_err_t (*eth_tx)(rt_device_t dev, struct pbuf* p);
|
||||
// struct pbuf* (*eth_rx)(rt_device_t dev);
|
||||
// rt_err_t (*eth_tx)(rt_device_t dev, struct pbuf* p);
|
||||
};
|
||||
|
||||
rt_err_t eth_device_ready(struct eth_device* dev);
|
||||
|
@@ -77,14 +77,18 @@ INC=[
|
||||
'-ISrc/zlib',
|
||||
'-ISrc/NES',
|
||||
# '-ISrc/TinyUSB/lib/rt-thread',
|
||||
'-ISrc/TinyUSB/examples/device/cdc_dual_ports/src',
|
||||
'-ISrc/TinyUSB/src/class/cdc',
|
||||
'-ISrc/TinyUSB/examples/device/net_lwip_webserver/src',
|
||||
'-ISrc/TinyUSB/src/class/net',
|
||||
'-ISrc/TinyUSB/src/common',
|
||||
'-ISrc/TinyUSB/src/device',
|
||||
'-ISrc/TinyUSB/src/portable/synopsys/dwc2',
|
||||
'-ISrc/TinyUSB/src',
|
||||
'-ISrc/TinyUSB/src/osal',
|
||||
'-ISrc/TinyUSB/hw',
|
||||
'-ISrc/TinyUSB/lib/networking',
|
||||
|
||||
'-ISrc/rt-thread/components/net/lwip-2.1.0/src/include',
|
||||
'-ISrc/rt-thread/components/net/lwip-2.1.0/src/arch/include'
|
||||
]
|
||||
|
||||
SRC_DIR=[
|
||||
@@ -102,10 +106,14 @@ SRC_DIR=[
|
||||
'Src/rt-thread/src',
|
||||
# 'Src/sqlite3',
|
||||
'Src/TinyUSB/src/class/cdc',
|
||||
'Src/TinyUSB/src/class/net',
|
||||
'Src/TinyUSB/src/common',
|
||||
'Src/TinyUSB/src/device',
|
||||
'Src/TinyUSB/src/portable/synopsys/dwc2',
|
||||
'Src/TinyUSB/lib/networking',
|
||||
# 'Src/TinyUSB/src',
|
||||
|
||||
'Src/rt-thread/components/net/lwip-2.1.0/src',
|
||||
]
|
||||
|
||||
SRC=[
|
||||
@@ -156,8 +164,9 @@ SRC=[
|
||||
'Src/NES/nes_mapper.c',
|
||||
|
||||
'Src/TinyUSB/src/tusb.c',
|
||||
'Src/TinyUSB/lib/rt-thread/tusb_rt_thread_port.c',
|
||||
'Src/TinyUSB/examples/device/cdc_dual_ports/src/usb_descriptors.c',
|
||||
# 'Src/TinyUSB/lib/rt-thread/tusb_rt_thread_port.c',
|
||||
'Src/TinyUSB/examples/device/net_lwip_webserver/src/main.c',
|
||||
'Src/TinyUSB/examples/device/net_lwip_webserver/src/usb_descriptors.c',
|
||||
'Src/TinyUSB/hw/bsp/board.c'
|
||||
]
|
||||
|
||||
|
Reference in New Issue
Block a user