2021-12-22 11:31:06 -06:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef XHCI_H
|
|
|
|
#define XHCI_H
|
2022-02-19 10:17:40 -06:00
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
*
|
2021-12-22 11:31:06 -06:00
|
|
|
* Provides support for USB keyboards connected via an XHCI controller.
|
|
|
|
*
|
2022-02-19 13:56:55 -06:00
|
|
|
*//*
|
2022-01-08 17:00:28 -06:00
|
|
|
* Copyright (C) 2021-2022 Martin Whitaker.
|
2021-12-22 11:31:06 -06:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2022-01-08 17:14:50 -06:00
|
|
|
#include "usbhcd.h"
|
2022-01-08 17:00:28 -06:00
|
|
|
|
2022-02-19 10:17:40 -06:00
|
|
|
/**
|
2021-12-22 11:31:06 -06:00
|
|
|
* Initialises the XHCI device found at base_addr, scans all the attached USB
|
|
|
|
* devices, and configures any HID USB keyboard devices it finds to generate
|
2022-01-08 17:00:28 -06:00
|
|
|
* periodic interrupt transfers that report key presses. Initialises hcd and
|
|
|
|
* returns true if the device was successfully initialised and one or more
|
|
|
|
* keyboards were found.
|
2021-12-22 11:31:06 -06:00
|
|
|
*/
|
2022-01-08 17:00:28 -06:00
|
|
|
bool xhci_init(uintptr_t base_addr, usb_hcd_t *hcd);
|
2021-12-22 11:31:06 -06:00
|
|
|
|
|
|
|
#endif // XHCI_H
|