Newer
Older
honey-os / src / userland / usb / xhci / commands.h
@biosfood biosfood on 21 Jul 2023 904 bytes add recepient to usbGetDescriptor
#ifndef COMMANDS_H
#define COMMANDS_H

#include "xhci.h"
#include <stdint.h>

extern CommandCompletionEvent *xhciCommand(XHCIController *controller,
                                           uint32_t dataLow, uint32_t dataHigh,
                                           uint32_t status, uint32_t control);
extern void addressDevice(SlotXHCI *slot, bool BSR);
extern void configureEndpoint(XHCIController *controller, void *inputContext,
                              uint32_t slotNumber, bool deconfigure);
extern void evaluateContext(XHCIController *controller, void *inputContext,
                            uint32_t slotNumber);

extern uint32_t requestSlotIndex(XHCIController *controller);

extern void *xhciGetDescriptor(SlotXHCI *slot, uint32_t value,
                                    uint32_t index, void *buffer, uint8_t recepient);

extern TrbRing *createSlotTRB(SlotXHCI *slot);

#endif