Sensoray 2255 User Manual
Page 24
a snapshot is triggered, the acquisition loop will save the image to file with the planar_to_rgb8 and
save_image_uncompressed files. In the demo application, a snapshot is triggered with the command
“snap filename.bmp”.
After the acquisition loop is exited(with a “stop channel” command), the function S2255_StopAcquire
should be called. Finally, the user memory should be unmapped with munmap and the working buffers
freed.
Other demo functions
•
video brightness: “bright n” where n is –127 to 128 (default 0))
•
video contrast: “contrast n” where n is 0 to 255 ( default 0x5c from s2255.h)
•
video saturation: “vsat n” where n is 0 to 255 (default 0x80)
•
video hue: “vhue n” where n is 0 to 255 (default 0)
•
video system “vsystem n” where n=1 NTSC, n=2 PAL
•
frame decimation “fdec n v” where n is the channel, v value(1 all frames, 2 every 2
nd
, 3 every
3
rd
, 5 every 5
th
)
•
scale “scale n v” where n is the channel, v scale(1-4CIFS, 2-2CIFS, 3-1CIFS)
Unsupported function(s) in demo application
•
Monochrome capture: Demo application does not currently demonstrate monochrome
operation.
Driver Details (advanced)
This section is not meant for the average or even expert user. Most users can ignore all of this section.
This section is only for OEMs who may want to port the driver to another OS such as VXWorks or QNX.
This section assumes a basic knowledge of device drivers. The full details are not given here, just the
main points about the USB pipes. The full source code for the Linux driver is available (to see the
StartAcquire commands, etc…). Sensoray reserves the right to change any operation of the
hardware/software.
The driver is composed of the following files:
s2255core.c
: Core hardware operations. Should be mostly OS independent.
s2255mod.c
: Module specific functions. OS dependent driver functions and IOCTLs.
s2255usb.c
: Also OS dependent functions but specific to USB
size.c
: size functions for various 2255 modes.
24