feature (libnxdrv): implemented basic configuration API calls
This commit is contained in:
parent
dab15d67c6
commit
2c4cb4dd01
|
@ -1,8 +1,37 @@
|
||||||
// This file is part of noxos and licensed under the MIT open source license
|
// This file is part of noxos and licensed under the MIT open source license
|
||||||
|
|
||||||
#ifndef NOXOS_LIBNXDRV_H
|
#ifndef LIBNXDRV_LIBNXDRV_H
|
||||||
#define NOXOS_LIBNXDRV_H
|
#define LIBNXDRV_LIBNXDRV_H
|
||||||
|
|
||||||
void nx_drv_init();
|
#include "stdtypes.h"
|
||||||
|
|
||||||
#endif //NOXOS_LIBNXDRV_H
|
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
|
|
@ -0,0 +1,22 @@
|
||||||
|
// This file is part of noxos and licensed under the MIT open source license
|
||||||
|
|
||||||
|
#ifndef LIBNXDRV_STDTYPES_H
|
||||||
|
#define LIBNXDRV_STDTYPES_H
|
||||||
|
|
||||||
|
typedef unsigned char uint8_t;
|
||||||
|
typedef signed char int8_t;
|
||||||
|
typedef unsigned short uint16_t;
|
||||||
|
typedef signed short int16_t;
|
||||||
|
typedef unsigned int uint32_t;
|
||||||
|
typedef signed int int32_t;
|
||||||
|
typedef unsigned long uint64_t;
|
||||||
|
typedef signed long int64_t;
|
||||||
|
|
||||||
|
typedef _Bool bool;
|
||||||
|
|
||||||
|
#define true 1
|
||||||
|
#define false 0
|
||||||
|
|
||||||
|
#define NULL (void*)0
|
||||||
|
|
||||||
|
#endif //LIBNXDRV_STDTYPES_H
|
|
@ -1,5 +1,15 @@
|
||||||
// This file is part of noxos and licensed under the MIT open source license
|
// This file is part of noxos and licensed under the MIT open source license
|
||||||
|
|
||||||
void nx_drv_init() {
|
#include "libnxdrv.h"
|
||||||
|
|
||||||
|
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) {
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue