feature (test driver): configuring driver on init

This commit is contained in:
antifallobst 2023-06-01 22:53:51 +02:00
parent 1f85d26779
commit b2948a49fd
2 changed files with 18 additions and 3 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
build build
*/CMakeLists.txt
*/cmake-build-debug

View File

@ -1,7 +1,20 @@
#include "libnxdrv.h" #include "libnxdrv.h"
int _start() { nx_drv_config_pci_T config_pci = {
nx_drv_init(); .enable_progif = true,
.class = 0x01,
.subclass = 0x06,
.progif = 0x01,
.num_device_ids = 1,
.device_ids = {
.vendor_id = 0x8086,
.device_id = 0x2922
}
};
int _init() {
nx_drv_pci_config(&config_pci);
nx_drv_log("test driver initialized");
return 0; return 0;
} }