-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcamera_ptzcontrol.c
95 lines (83 loc) · 1.93 KB
/
camera_ptzcontrol.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
## Cypress FX3 Camera Kit source file (camera_ptzcontrol.c)
## ===========================
##
## Copyright Cypress Semiconductor Corporation, 2010-2012,
## All Rights Reserved
## UNPUBLISHED, LICENSED SOFTWARE.
##
## CONFIDENTIAL AND PROPRIETARY INFORMATION
## WHICH IS THE PROPERTY OF CYPRESS.
##
## Use of this file is governed
## by the license agreement included in the file
##
## <install>/license/license.txt
##
## where <install> is the Cypress software
## installation root directory path.
##
## ===========================
*/
/*
* This file contains function stubs that can be filled in to implement Pan, Tilt
* and Zoom controls for the UVC camera application. These functions have not been
* implemented for the image sensor as of now.
*/
#include "uvc.h"
#include "camera_ptzcontrol.h"
#ifdef UVC_PTZ_SUPPORT
int32_t pan_cur; /* Current pan value. */
int32_t tilt_cur; /* Current tilt value. */
uint16_t zoom_cur; /* Current zoom value. */
void
CyFxUvcAppPTZInit (
void)
{
/* Initialize the Pan, Tilt and Zoom control values. Code can be added here to configure these
* values on the sensor as well.
*/
zoom_cur = ZOOM_DEFAULT;
pan_cur = 0;
tilt_cur = 0;
}
uint16_t
CyFxUvcAppGetCurrentZoom (
void)
{
return zoom_cur;
}
int32_t
CyFxUvcAppGetCurrentPan (
void)
{
return pan_cur;
}
int32_t
CyFxUvcAppGetCurrentTilt (
void)
{
return tilt_cur;
}
void
CyFxUvcAppModifyPan (
int32_t panValue)
{
/* Place holder for the pan modification function */
pan_cur = panValue;
}
void
CyFxUvcAppModifyTilt (
int32_t tiltValue)
{
/* Place holder for the tilt modification function */
tilt_cur = tiltValue;
}
void
CyFxUvcAppModifyZoom (
uint16_t zoomValue)
{
/* Place holder for the zoom modification function */
zoom_cur = zoomValue;
}
#endif