Skip to content

Commit a13136a

Browse files
committed
Add USB host header; remove hal_gpio headers
Add lib-gd32/include/device/host/host.h which introduces a usb::host API with Status, Speed and Class enums and declarations for get_status(), get_speed() and get_class(). Remove two legacy GPIO headers: lib-hal/include/gd32/hal_gpio.h and lib-hal/include/hal_gpio.h (deleted), likely as part of HAL refactoring or header consolidation.
1 parent 99a7779 commit a13136a

3 files changed

Lines changed: 43 additions & 100 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* host.h
3+
*/
4+
5+
#ifndef DEVICE_USB_HOSTMSC_H_
6+
#define DEVICE_USB_HOSTMSC_H_
7+
8+
9+
namespace usb::host {
10+
11+
enum class Status {
12+
NOT_AVAILABLE,
13+
DISCONNECTED,
14+
RESET,
15+
SPEED_AVAILALBE,
16+
ATTACHED,
17+
CONNECTED,
18+
ENUMERATION_COMPLETED,
19+
READY,
20+
DEVICE_NOT_SUPPORTED,
21+
UNRECOVERABLE_ERROR
22+
};
23+
24+
enum class Speed {
25+
FAULT,
26+
LOW,
27+
FULL,
28+
HIGH
29+
};
30+
31+
enum class Class {
32+
NOT_SUPPORTED,
33+
MSC,
34+
HID
35+
};
36+
37+
Status get_status();
38+
Speed get_speed();
39+
Class get_class();
40+
} // namespace usb::host
41+
42+
43+
#endif /* DEVICE_USB_HOSTMSC_H_ */

lib-hal/include/gd32/hal_gpio.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

lib-hal/include/hal_gpio.h

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)