2023-05-30 20:16:46 +00:00
|
|
|
// This file is part of noxos and licensed under the MIT open source license
|
|
|
|
|
2023-06-01 10:01:05 +00:00
|
|
|
#ifndef LIBNXDRV_LIBNXDRV_H
|
|
|
|
#define LIBNXDRV_LIBNXDRV_H
|
2023-05-30 20:16:46 +00:00
|
|
|
|
2023-06-01 10:01:05 +00:00
|
|
|
#include "stdtypes.h"
|
2023-05-30 20:16:46 +00:00
|
|
|
|
2023-06-01 10:01:05 +00:00
|
|
|
typedef struct {
|
|
|
|
uint16_t vendor_id;
|
|
|
|
uint16_t device_id;
|
|
|
|
} __attribute__((packed)) nx_drv_device_id_T;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bool enable_progif;
|
|
|
|
uint8_t class;
|
|
|
|
uint8_t subclass;
|
|
|
|
uint8_t progif;
|
|
|
|
uint16_t num_device_ids;
|
|
|
|
nx_drv_device_id_T device_ids;
|
|
|
|
} __attribute__((packed)) nx_drv_config_pci_T;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint8_t min_version;
|
|
|
|
uint16_t num_device_ids;
|
|
|
|
nx_drv_device_id_T device_ids;
|
|
|
|
} __attribute__((packed)) nx_drv_config_usb_T;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint8_t gpt_guid[16];
|
|
|
|
uint8_t mbr_type;
|
|
|
|
} __attribute__((packed)) nx_drv_config_fs_T;
|
|
|
|
|
|
|
|
void nx_drv_pci_config(nx_drv_config_pci_T* config);
|
|
|
|
void nx_drv_usb_config(nx_drv_config_usb_T* config);
|
|
|
|
void nx_drv_fs_config (nx_drv_config_fs_T* config);
|
|
|
|
|
|
|
|
#endif //LIBNXDRV_LIBNXDRV_H
|