INNER CODE UNIT · C++

device_model

nihui/opencv-mobile · highgui/src/capture_cvi.cpp:51

    static int device_model = -1;

    if (device_model >= 0)
        return device_model;

    device_model = 0;

    FILE* fp = fopen("/proc/device-tree/model", "rb");
    if (fp)
    {
        char buf[1024];
        fgets(buf, 1024, fp);
        fclose(fp);

        if (strncmp(buf, "Cvitek. CV180X ASIC. C906.", 36) == 0 || strncmp(buf, "Milk-V Duo", 10) == 0)
        {
            // milkv duo
            device_model = 1;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…