NVIDIA DRIVE OS Linux SDK API Reference

5.1.6.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

Program elements related to NvMediaISCDeviceDriver, which defines a device driver.

The core NvMediaISC calls the driver when the client calls the related public NvMediaISC function.

Before the client can create an NvMediaISCDevice object (a device), it must provide a device driver. The NvMediaISCDeviceDriver object contains the following data fields and function pointers.

Data Fields
  • deviceName The name of the device. This is a null-terminated string.
  • regLength Target device offset length in bytes.
  • dataLength Target device data length in bytes.
Function Pointers

Here is a sample device driver implementation. The source file defines the driver by creating an NvMediaISCDeviceDriver struct and setting its function pointers. The header file provides a function that retrieves a pointer to the driver struct.

Header File
#include <nvmedia_isc.h>
NvMediaISCDeviceDriver *GetSAMPLEDEVICEDriver(void);

Source File

#include "isc_sample_device.h"
DriverCreate(
void *clientContext)
{
if(!handle)
// Can be used to maintain local device context
// or can be set to NULL.
handle->deviceDriverHandle = NULL;
}
static NvMediaISCDeviceDriver deviceDriver = {
.deviceName = "Sample Sensor Device",
.DriverCreate = DriverCreate
};
GetSAMPLEDEVICEDriver(void)
{
// Return device driver descriptor structure
return &deviceDriver;
}

Data Structures

struct  NvMediaISCDeviceDriver
 Holds device driver data. More...