XenevaOS
Loading...
Searching...
No Matches
Functions
xhci.cpp File Reference
#include "xhci.h"
#include <stdint.h>
#include <_null.h>
#include <Mm/kmalloc.h>
#include <Hal/x86_64_cpu.h>
Include dependency graph for xhci.cpp:

Functions

XHCIEndpointXHCISlotGetEP_DCI (XHCISlot *slot, uint8_t endp_num)
 
XHCISlotXHCIGetSlotByID (XHCIDevice *dev, uint8_t slot_id)
 
XHCIEndpointXHCISlotGetEP (XHCISlot *slot, uint8_t endp_num)
 
void XHCIAddSlot (XHCIDevice *dev, XHCISlot *slot)
 
void XHCISlotRemove (XHCIDevice *dev, uint8_t slot_id)
 
size_t XHCIGetMaxPacketSize (uint8_t speed)
 
void XHCISendCmdDefaultEP (XHCISlot *slot, uint32_t param1, uint32_t param2, uint32_t status, uint32_t ctrl)
 
void XHCISendCmdOtherEP (XHCISlot *slot, uint8_t endp_num, uint32_t param1, uint32_t param2, uint32_t status, uint32_t ctrl)
 
void XHCISendCmdToHost (XHCIDevice *dev, uint32_t param1, uint32_t param2, uint32_t status, uint32_t ctrl)
 
void XHCIRingDoorbellHost (XHCIDevice *dev)
 
void XHCIRingDoorbellSlot (XHCIDevice *dev, uint8_t slot, uint32_t endpoint)
 
int XHCIPollEvent (XHCIDevice *usb_device, int trb_type)
 

Function Documentation

◆ XHCIAddSlot()

void XHCIAddSlot ( XHCIDevice dev,
XHCISlot slot 
)

◆ XHCIGetMaxPacketSize()

size_t XHCIGetMaxPacketSize ( uint8_t  speed)

◆ XHCIGetSlotByID()

XHCISlot * XHCIGetSlotByID ( XHCIDevice dev,
uint8_t  slot_id 
)

◆ XHCIPollEvent()

int XHCIPollEvent ( XHCIDevice usb_device,
int  trb_type 
)
  • here we need a delay, while using VirtualBox *‍/

◆ XHCIRingDoorbellHost()

void XHCIRingDoorbellHost ( XHCIDevice dev)

◆ XHCIRingDoorbellSlot()

void XHCIRingDoorbellSlot ( XHCIDevice dev,
uint8_t  slot,
uint32_t  endpoint 
)

◆ XHCISendCmdDefaultEP()

void XHCISendCmdDefaultEP ( XHCISlot slot,
uint32_t  param1,
uint32_t  param2,
uint32_t  status,
uint32_t  ctrl 
)

◆ XHCISendCmdOtherEP()

void XHCISendCmdOtherEP ( XHCISlot slot,
uint8_t  endp_num,
uint32_t  param1,
uint32_t  param2,
uint32_t  status,
uint32_t  ctrl 
)

◆ XHCISendCmdToHost()

void XHCISendCmdToHost ( XHCIDevice dev,
uint32_t  param1,
uint32_t  param2,
uint32_t  status,
uint32_t  ctrl 
)

◆ XHCISlotGetEP()

XHCIEndpoint * XHCISlotGetEP ( XHCISlot slot,
uint8_t  endp_num 
)

◆ XHCISlotGetEP_DCI()

XHCIEndpoint * XHCISlotGetEP_DCI ( XHCISlot slot,
uint8_t  endp_num 
)

BSD 2-Clause License

Copyright (c) 2022-2025, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ XHCISlotRemove()

void XHCISlotRemove ( XHCIDevice dev,
uint8_t  slot_id 
)