add usb rndis host driver

This commit is contained in:
sakumisu
2022-04-04 15:46:22 +08:00
parent a5ee5b4152
commit 12849228d5
4 changed files with 484 additions and 24 deletions

View File

@@ -0,0 +1,52 @@
/**
* @file usbh_rndis.h
* @brief
*
* Copyright (c) 2022 sakumisu
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
#ifndef _USBH_RNDIS_H
#define _USBH_RNDIS_H
#include "usb_cdc.h"
struct usbh_rndis {
struct usbh_hubport *hport;
uint8_t ctrl_intf; /* Control interface number */
uint8_t data_intf; /* Data interface number */
usbh_epinfo_t bulkin; /* Bulk IN endpoint */
usbh_epinfo_t bulkout; /* Bulk OUT endpoint */
usbh_epinfo_t intin; /* Notify endpoint */
uint32_t request_id;
uint8_t mac[6];
};
#ifdef __cplusplus
extern "C" {
#endif
int usbh_rndis_keepalive(struct usbh_rndis *rndis_class);
#ifdef __cplusplus
}
#endif
#endif