make hub_set_feature and hub_clear_feature api public
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
#include "usbh_core.h"
|
||||||
#include "usbh_hub.h"
|
#include "usbh_hub.h"
|
||||||
|
|
||||||
#define DEV_FORMAT "/dev/hub%d"
|
#define DEV_FORMAT "/dev/hub%d"
|
||||||
@@ -238,7 +239,7 @@ static int usbh_hub_get_portstatus(struct usbh_hub *hub, uint8_t port, struct hu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int usbh_hub_set_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature)
|
int usbh_hub_set_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature)
|
||||||
{
|
{
|
||||||
struct usb_setup_packet roothub_setup;
|
struct usb_setup_packet roothub_setup;
|
||||||
struct usb_setup_packet *setup;
|
struct usb_setup_packet *setup;
|
||||||
@@ -256,7 +257,7 @@ static int usbh_hub_set_feature(struct usbh_hub *hub, uint8_t port, uint8_t feat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int usbh_hub_clear_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature)
|
int usbh_hub_clear_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature)
|
||||||
{
|
{
|
||||||
struct usb_setup_packet roothub_setup;
|
struct usb_setup_packet roothub_setup;
|
||||||
struct usb_setup_packet *setup;
|
struct usb_setup_packet *setup;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#ifndef USBH_HUB_H
|
#ifndef USBH_HUB_H
|
||||||
#define USBH_HUB_H
|
#define USBH_HUB_H
|
||||||
|
|
||||||
#include "usbh_core.h"
|
|
||||||
#include "usb_hub.h"
|
#include "usb_hub.h"
|
||||||
|
|
||||||
#define USBH_HUB_MAX_PORTS 4
|
#define USBH_HUB_MAX_PORTS 4
|
||||||
@@ -14,10 +13,15 @@
|
|||||||
#define USBH_HUB_INTIN_BUFSIZE ((USBH_HUB_MAX_PORTS + 8) >> 3)
|
#define USBH_HUB_INTIN_BUFSIZE ((USBH_HUB_MAX_PORTS + 8) >> 3)
|
||||||
|
|
||||||
extern usb_slist_t hub_class_head;
|
extern usb_slist_t hub_class_head;
|
||||||
|
extern struct usbh_hub roothub;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int usbh_hub_set_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature);
|
||||||
|
int usbh_hub_clear_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature);
|
||||||
|
|
||||||
void usbh_roothub_thread_wakeup(uint8_t port);
|
void usbh_roothub_thread_wakeup(uint8_t port);
|
||||||
int usbh_hub_initialize(void);
|
int usbh_hub_initialize(void);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#include "usbh_core.h"
|
#include "usbh_core.h"
|
||||||
#include "usbh_hub.h"
|
|
||||||
|
|
||||||
struct usbh_class_info *usbh_class_info_table_begin = NULL;
|
struct usbh_class_info *usbh_class_info_table_begin = NULL;
|
||||||
struct usbh_class_info *usbh_class_info_table_end = NULL;
|
struct usbh_class_info *usbh_class_info_table_end = NULL;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#include "usb_log.h"
|
#include "usb_log.h"
|
||||||
#include "usb_hc.h"
|
#include "usb_hc.h"
|
||||||
#include "usb_osal.h"
|
#include "usb_osal.h"
|
||||||
#include "usb_hub.h"
|
#include "usbh_hub.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
Reference in New Issue
Block a user