NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.0 Release
For Test and Development only

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...
 
NVMEDIA_STATUS_OK
@ NVMEDIA_STATUS_OK
Specifies that the operation completed successfully (with no error).
Definition: nvmedia_core.h:183
NvMediaISCDeviceDriver
Holds device driver data.
Definition: nvmedia_isc.h:394
NvMediaISCDeviceDriver::deviceName
char * deviceName
Holds the device name.
Definition: nvmedia_isc.h:396
nvmedia_isc.h
NVIDIA Media Interface: Image Sensor Control (ISC)
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:180
NvMediaISCDevice
Holds the handle for an NvMediaISCDevice object.
Definition: nvmedia_isc.h:180
NvMediaISCDevice::deviceDriverHandle
void * deviceDriverHandle
Definition: nvmedia_isc.h:181
NVMEDIA_STATUS_BAD_PARAMETER
@ NVMEDIA_STATUS_BAD_PARAMETER
Specifies that a bad parameter was passed.
Definition: nvmedia_core.h:185