summaryrefslogtreecommitdiffstats
path: root/src/cameras/ipe.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-09-27 16:28:10 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-09-27 16:28:10 +0200
commitcb66db4b221e516153763735f1994206aa20abe4 (patch)
treed664d5196da7b39a84a08fdd4da852a6f3d7779a /src/cameras/ipe.c
parentc6d58023d20e4e7a7c4a52294f3fdf17738f76c9 (diff)
downloaduca-cb66db4b221e516153763735f1994206aa20abe4.tar.gz
uca-cb66db4b221e516153763735f1994206aa20abe4.tar.bz2
uca-cb66db4b221e516153763735f1994206aa20abe4.tar.xz
uca-cb66db4b221e516153763735f1994206aa20abe4.zip
Add: set exposure time for IPE camera
Diffstat (limited to 'src/cameras/ipe.c')
-rw-r--r--src/cameras/ipe.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cameras/ipe.c b/src/cameras/ipe.c
index c398350..78d2c98 100644
--- a/src/cameras/ipe.c
+++ b/src/cameras/ipe.c
@@ -16,6 +16,17 @@ static void uca_ipe_handle_error(const char *format, ...)
static uint32_t uca_ipe_set_property(struct uca_camera_priv *cam, enum uca_property_ids property, void *data)
{
+ pcilib_t *handle = GET_HANDLE(cam);
+ pcilib_register_value_t value = *((pcilib_register_value_t *) data);
+
+ switch (property) {
+ case UCA_PROP_EXPOSURE:
+ pcilib_write_register(handle, NULL, "exp_time", value);
+ break;
+
+ default:
+ return UCA_ERR_CAMERA | UCA_ERR_PROP | UCA_ERR_INVALID;
+ }
return UCA_NO_ERROR;
}