42. Developer Guide¶
42.1. Overview¶
whenimage mostafteronepixelthroughafterthentakeobtainstatistical information, usepersoncanthrough
CVI_ISP_GetVDTimeOutusingsynchronousobtainobtainsystemstatisticalvalue, canReference33.1.8 flow.becauseisLinuxsystemsystemuser spacetaskschedulenotcanguaranteeconsistent real-time performance, need towilldriverconfigurationplaceinkernel spacecomplete.
ISPprovidesynchronouscallback interface Register, canto implementandVDsynchronous.
inthischapterhavecorresponding interfaceuseDescription, usercanwillreal-time performancerequirerelativelyheight taskplaceinsynchronous callbackinsurface, lowerlayerprovideHwIRQ, Workqueuetwokindmethodimplement, canselectcorresponding implementmethodusingcorrectsetreal-timelevel.
HwIRQisindicatetaskplaceininterrupt serviceinimplement, real-time performancemostheight, Workqueue real-time performancetakedecideinlinuxsystemsystemcall.
42.2. API Reference¶
isp_sync_task_register : toISPregister synchronouscallback interface.
isp_sync_task_unregister : toISPreverseregister synchronouscallback interface.
42.2.1. isp_sync_task_register¶
[Description]
toISPregister synchronouscallback interface
[Syntax]
int isp_sync_task_register(int vi_pipe, struct isp_sync_task_node *new_node);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
vi_pipe |
VI_PIPE No. |
Input |
new_node |
newinsert synchronous callbacknode |
Input |
[Return Value]
Return Value |
Description |
|---|---|
0 |
Success. |
Non-zero |
Failure. |
[Requirements]
Header File: cvi_vip_isp_ext.h
Library File:
[Note]
Before use, ensure thatISPdriveralreadyload.
becauseisISPsynchronous callbackinternalimplementnotsaveuserpassed in new_node indicateto actualbody, theusingrequireuse isp_sync_task_node Define actualbodywhennotcanislocalchangeamount.
[Example]
None.
[Related Topics]
42.2.2. isp_sync_task_unregister¶
[Description]
toISPreverseregister synchronouscallback interface
[Syntax]
int isp_sync_task_unregister(int vi_pipe, struct isp_sync_task_node *del_node);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
vi_pipe |
VI_PIPE No. |
Input |
del_node |
need todelete synchronous callbacknode |
Input |
[Return Value]
Return Value |
Description |
|---|---|
0 |
Success. |
Non-zero |
Failure. |
[Requirements]
Header File: cvi_vip_isp_ext.h
Library File:
[Note]
Before use, ensure thatISPdriveralreadyload.
[Example]
None.
[Related Topics]
42.3. Data Types¶
isp_sync_tsk_method : Define synchronous callbackmethod, determinesreal-time performance.
isp_sync_task_node : Define synchronous callbacknodeinformation.
42.3.1. isp_sync_tsk_method¶
[Description]
Define synchronous callbackmethod, determinesreal-time performance
[Definition]
enum isp_sync_tsk_method {
ISP_SYNC_TSK_METHOD_HW_IRQ = 0,
ISP_SYNC_TSK_METHOD_WORKQUE,
ISP_SYNC_TSK_METHOD_BUTT
};
[Members]
Member Name |
Description |
|---|---|
ISP_SYNC_TSK_METHOD_HW_IRQ |
usehardware interruptmethodcallback. |
ISP_SYNC_TSK_METHOD_HW_WORKQUE |
usework queuemethodcallback. |
[Precautions]
None.
[Related Data Types and Interfaces]
None.
42.3.2. isp_sync_task_node¶
[Description]
Define synchronous callbacknodeinformation
[Definition]
struct isp_sync_task_node {
enum isp_sync_tsk_method method;
__s32 (*isp_sync_tsk_call_back)(__u64 data);
__u64 data;
const char *sz_id;
struct list_head list;
};
[Members]
Member Name |
Description |
|---|---|
method |
callbackmethod. |
isp_sync_tsk_call_back |
callback function, userRegisterwhenpassed in. |
data |
callback functionparameternumber, userRegisterwhenpassed in. |
sz_id |
nodeID. |
list |
listnode, useinmanagemultiplereturnAdjustpoint, no need toconcern. |
[Example]
isp_sync_task_node sync_node = {
.method = ISP_SYNC_TSK_METHOD_HW_IRQ,
.isp_sync_tsk_call_back = sync_af_calc,
.data = 0,
.sz_id = "hw_0"
};
[Precautions]
None.
[Related Data Types and Interfaces]