Version v0.3.23 - Reorganized project structure - all sources in src/, builds in build/
This commit is contained in:
23
tests/temp_device_test.c
Normal file
23
tests/temp_device_test.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "include/otp.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
(void)argc; (void)argv;
|
||||
|
||||
hardware_rng_device_t devices[10];
|
||||
int num_devices_found = 0;
|
||||
|
||||
if (detect_all_hardware_rng_devices(devices, 10, &num_devices_found) != 0) {
|
||||
printf("ERROR: Device detection failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("DEVICES_FOUND:%d\n", num_devices_found);
|
||||
|
||||
for (int i = 0; i < num_devices_found; i++) {
|
||||
printf("DEVICE:%d:%s:%d:%s\n", i, devices[i].port_path, devices[i].device_type, devices[i].friendly_name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user