memtest86plus/system/ohci.h
Martin Whitaker 8069b8724b Initial support for native USB keyboard interface.
This adds support for USB keyboards connected directly to an OHCI
or XHCI controller.
2021-12-22 17:31:06 +00:00

27 lines
756 B
C

// SPDX-License-Identifier: GPL-2.0
#ifndef OHCI_H
#define OHCI_H
/*
* Provides support for USB keyboards connected via an OHCI controller.
*
* Copyright (C) 2021 Martin Whitaker.
*/
#include <stdint.h>
/*
* Initialises the OHCI device found at base_addr, scans all the attached USB
* devices, and configures any HID USB keyboard devices it finds to generate
* periodic interrupt transfers that report key presses.
*/
void *ohci_init(uintptr_t base_addr);
/*
* Polls the completed periodic interrupt transfers, stores the keycodes from
* any new key press events in an internal queue, and if the keycode queue is
* not empty, pops and returns the keycode from the front of the queue.
*/
uint8_t ohci_get_keycode(void *ws);
#endif // OHCI_H