mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 09:06:32 +00:00
xhci: 获取设备描述符并配置endpoint (#50)
* 调整:使用宏定义来声明usb请求包 * new: 获取usb设备的config描述符 * new: 获取接口及端点描述符 * 临时修正系统根分区的挂载,使得能在真机上启动shell * xhci: set_config * bugfix: 解决之前错误的将control_endpoint信息绑定在xhci_hc下的bug * xhci configure endpoint(存在bug * 1 * 解决了configure endpoint出错的问题 * new: xhci驱动程序能够配置端点 * 删除trace usb的代码 xhci: 获取设备描述符并配置endpoint 存在问题:尚未能够正确初始化usb键盘,也没有将usb键盘相关的代码独立出来。
This commit is contained in:
@ -18,17 +18,15 @@ extern struct blk_gendisk ahci_gendisk0;
|
||||
/**
|
||||
* @brief 注册指定磁盘上的指定分区的fat32文件系统
|
||||
*
|
||||
* @param ahci_ctrl_num ahci控制器编号
|
||||
* @param ahci_port_num ahci控制器端口编号
|
||||
* @param blk_dev 块设备结构体
|
||||
* @param part_num 磁盘分区编号
|
||||
*
|
||||
* @return struct vfs_super_block_t * 文件系统的超级块
|
||||
*/
|
||||
struct vfs_superblock_t *fat32_register_partition(uint8_t ahci_ctrl_num, uint8_t ahci_port_num, uint8_t part_num)
|
||||
struct vfs_superblock_t *fat32_register_partition(struct block_device *blk_dev, uint8_t part_num)
|
||||
{
|
||||
|
||||
// 挂载文件系统到vfs
|
||||
return vfs_mount_fs("/", "FAT32", (ahci_gendisk0.partition + 0));
|
||||
return vfs_mount_fs("/", "FAT32", blk_dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1259,6 +1257,6 @@ void fat32_init()
|
||||
vfs_register_filesystem(&fat32_fs_type);
|
||||
|
||||
// 挂载根文件系统
|
||||
fat32_register_partition(0, 0, 0);
|
||||
fat32_register_partition(ahci_gendisk0.partition + 0, 0);
|
||||
kinfo("FAT32 initialized.");
|
||||
}
|
@ -167,11 +167,12 @@ typedef struct fat32_inode_info_t fat32_inode_info_t;
|
||||
/**
|
||||
* @brief 注册指定磁盘上的指定分区的fat32文件系统
|
||||
*
|
||||
* @param ahci_ctrl_num ahci控制器编号
|
||||
* @param ahci_port_num ahci控制器端口编号
|
||||
* @param blk_dev 块设备结构体
|
||||
* @param part_num 磁盘分区编号
|
||||
*
|
||||
* @return struct vfs_super_block_t * 文件系统的超级块
|
||||
*/
|
||||
struct vfs_superblock_t *fat32_register_partition(uint8_t ahci_ctrl_num, uint8_t ahci_port_num, uint8_t part_num);
|
||||
struct vfs_superblock_t *fat32_register_partition(struct block_device *blk_dev, uint8_t part_num);
|
||||
|
||||
/**
|
||||
* @brief 创建fat32文件系统的超级块
|
||||
@ -179,7 +180,7 @@ struct vfs_superblock_t *fat32_register_partition(uint8_t ahci_ctrl_num, uint8_t
|
||||
* @param blk 块设备结构体
|
||||
* @return struct vfs_superblock_t* 创建好的超级块
|
||||
*/
|
||||
struct vfs_superblock_t *fat32_read_superblock(struct block_device* blk);
|
||||
struct vfs_superblock_t *fat32_read_superblock(struct block_device *blk);
|
||||
|
||||
/**
|
||||
* @brief 创建新的文件
|
||||
|
Reference in New Issue
Block a user