Files
luban-lite-t3e-pro/packages/third-party/cherryusb/class/wireless/usbh_rndis.h

55 lines
1.3 KiB
C
Raw Normal View History

2023-08-30 16:21:18 +08:00
/*
* Copyright (c) 2022, sakumisu
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef USBH_RNDIS_H
#define USBH_RNDIS_H
#include "usb_cdc.h"
2024-01-27 08:47:24 +08:00
#include "lwip/netif.h"
#include "lwip/pbuf.h"
2023-08-30 16:21:18 +08:00
struct usbh_rndis {
struct usbh_hubport *hport;
2024-01-27 08:47:24 +08:00
struct usb_endpoint_descriptor *bulkin; /* Bulk IN endpoint */
struct usb_endpoint_descriptor *bulkout; /* Bulk OUT endpoint */
struct usb_endpoint_descriptor *intin; /* INTR endpoint */
struct usbh_urb bulkin_urb; /* Bulk IN urb */
struct usbh_urb bulkout_urb; /* Bulk OUT urb */
struct usbh_urb intin_urb; /* INTR IN urb */
2023-08-30 16:21:18 +08:00
uint8_t ctrl_intf; /* Control interface number */
uint8_t data_intf; /* Data interface number */
uint8_t minor;
2024-01-27 08:47:24 +08:00
2023-08-30 16:21:18 +08:00
uint32_t request_id;
uint32_t link_speed;
bool link_status;
uint8_t mac[6];
2024-01-27 08:47:24 +08:00
ip_addr_t ipaddr;
ip_addr_t netmask;
ip_addr_t gateway;
2023-08-30 16:21:18 +08:00
};
#ifdef __cplusplus
extern "C" {
#endif
int usbh_rndis_keepalive(struct usbh_rndis *rndis_class);
void usbh_rndis_run(struct usbh_rndis *rndis_class);
void usbh_rndis_stop(struct usbh_rndis *rndis_class);
2024-01-27 08:47:24 +08:00
err_t usbh_rndis_linkoutput(struct netif *netif, struct pbuf *p);
void usbh_rndis_rx_thread(void *argument);
2023-08-30 16:21:18 +08:00
#ifdef __cplusplus
}
#endif
#endif /* USBH_RNDIS_H */