Files
CherryUSB/class/hub/usbh_hub.h

34 lines
703 B
C
Raw Normal View History

/*
* Copyright (c) 2022, sakumisu
2022-02-08 11:44:46 +08:00
*
* SPDX-License-Identifier: Apache-2.0
2022-02-08 11:44:46 +08:00
*/
#ifndef USBH_HUB_H
#define USBH_HUB_H
2022-02-08 11:44:46 +08:00
#include "usb_hub.h"
2024-01-06 22:16:58 +08:00
struct usbh_hub;
2022-02-08 11:44:46 +08:00
#define USBH_HUB_MAX_PORTS 4
/* Maximum size of an interrupt IN transfer */
#define USBH_HUB_INTIN_BUFSIZE ((USBH_HUB_MAX_PORTS + 8) >> 3)
#ifdef __cplusplus
extern "C" {
#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);
2024-01-06 22:16:58 +08:00
void usbh_hub_thread_wakeup(struct usbh_hub *hub);
2023-12-24 23:37:47 +08:00
2024-01-06 22:16:58 +08:00
int usbh_hub_initialize(struct usbh_bus *bus);
int usbh_hub_deinitialize(struct usbh_bus *bus);
2023-12-24 23:37:47 +08:00
2022-02-08 11:44:46 +08:00
#ifdef __cplusplus
}
#endif
#endif /* USBH_HUB_H */