machine/usb: add back New() with deprecation comment to use Port() instead

Signed-off-by: deadprogram <ron@hybridgroup.com>
Этот коммит содержится в:
deadprogram 2022-10-17 11:50:21 +02:00 коммит произвёл Ron Evans
родитель 3d7f24e26c
коммит d56c9f5533
3 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -63,6 +63,12 @@ func init() {
}
}
// New returns the USB hid-keyboard port.
// Deprecated, better to just use Port()
func New() *keyboard {
return Port()
}
// Port returns the USB hid-keyboard port.
func Port() *keyboard {
return Keyboard

Просмотреть файл

@ -27,6 +27,12 @@ func init() {
}
}
// New returns the USB hid-mouse port.
// Deprecated, better to just use Port()
func New() *mouse {
return Port()
}
// Port returns the USB hid-mouse port.
func Port() *mouse {
return Mouse

Просмотреть файл

@ -24,6 +24,12 @@ func init() {
}
}
// New returns the USB MIDI port.
// Deprecated, better to just use Port()
func New() *midi {
return Port()
}
// Port returns the USB midi port.
func Port() *midi {
return Midi