
Proc Filesystem
=================

Digitizers are listed in:

/proc/ncast/digitizers

file.


Each digitizer state can by monitored by printing:

cat /proc/ncast/digitizer + appropriate slot number

cat /proc/ncast/digitizerexpress + appropriate slot number

or 

cat /proc/ncast/digitizer

for first DCC card found.



Content of /proc/digitizer
----------------------------

DIVER VERSION      = version of the driver
FPGA VERSION       = version of FPGA firmware used ( /lib/firmware/g3_fpga.bit for DCC3, /lib/firmware/dcc4.bit for DCC4)
OUTPUT RESOLUTION  = size of last frame produced by the driver
FIRMWARE VERSION   = version of firmware (firmware_xx.hex) uploaded into DCC card flash memory.
MAIN INPUT         = selected primary input
MAIN WINDOW        = position of main window
...




Issuing commands to control DCC card
--------------------------------------

To isse a DCC command you can type in into appropriate /proc/digitizer entry, for example:

echo <command> > /proc/digitizer

Supported commands are:

set_vga_brightness <integer 0 - 100>
set_vga_contrast <integer 0 - 100>
set_vga_saturation <integer 0 - 100>
set_vga_hue <integer 0 - 100>
set_dvi_brightness <integer 0 - 100>
set_dvi_contrast <integer 0 - 100>
set_dvi_saturation <integer 0 - 100>
set_dvi_hue <integer 0 - 100>
set_svideo_brightness <integer 0 - 100>
set_svideo_constrast <integer 0 - 100>
set_svideo_saturation <integer 0 - 100>
set_svideo_hue <integer 0 - 100>
set_svideo_sharpness <integer 0 - 45>
set_composite_brightness <integer 0 - 100>
set_composite_contrast <integer 0 - 100>
set_composite_saturation <integer 0 - 100>
set_composite_hue <integer 0 - 100>
set_composite_sharpness <integer 0 - 45>


set_vga_hpos <integer: -10 - 10>
set_vga_vpos <integer: -10 - 10>
set_vga
set_dvi
set_composite
set_svideo
set_auto
set_pip_vga
set_pip_dvi
set_pip_composite
set_pip_svideo
set_pip_auto
set_pip_on
set_pip_off

set_window x y width height     -- command must be checked
set_pip_window x y width height -- command must be checked


reset 
 - resets entire hardware (debug purpose only) 

sfpga <hex>,<hex>
 - set FPGA register (debug purpose only)

gfpga <hex>
 - get FPGA register (debug purpose only)

setfpga <integer>
 - sets maximum framerate to requested value.
    may be useful if somebody wants to capture exactly 30 fps as every second frame from 60 fps stream.
    
loglevel <0,1,2,3>
 - sets the loglevel 0 - do not print nothing,
                     1 - print single occasional events + specified checkpoints
                     2 - print all event + specified checkpoints
                     3 - print all events and all checkpoints
 
checkmask <0-65535>
 - specify check points to be printed.
 



 
 
Programming gm1601 firmware.
=============================

Some firmware must be programmed inside DCC card. 
DCC card is always shipped with latest available firmware. 
Latest available firmware is 2.04.


However this firmware may be updated with application digiupdate. 
Application digiupdate is available under "digitizer4/apps/digiupdate" directory, 
and needs to be compiled with gcc compiler, and "make" command.


Programming card DCC4 plugged into PCI-express slot 4
-------------------------------------------------------
Run digiupdate with appropriate Flash access entry, and file containing firmware 2.04.

 ./digiupdate /proc/ncast/Flash_digitizerexpress4 ../../firmware/firmware_2_04.hex 




Programming card DCC3 plugged into PCI slot 1
-------------------------------------------------

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
[root@localhost digiupdate]# ./digiupdate /proc/ncast/Flash_digitizer1 ../../firmware/firmware_2_04.hex 
Loaded 524288 bytes of image.
Flash manufacturer = 22F6
Flash device id    = 0001
Erasing flash.
Process: Erase
Process: Erase (3 completed)
Process: Erase (6 completed)
Process: Erase (9 completed)
Process: Erase (12 completed)
Process: Erase (15 completed)
Process: Erase (19 completed)
(...)
Process: Erase (92 completed)
Process: Erase (95 completed)
Process: Additonal Erase
Process: Additonal Erase (7 completed)
Process: Additonal Erase (8 completed)
Process: Additonal Erase (9 completed)
Process: Additonal Erase (10 completed)
Process: Additonal Erase completed.
Process: Writting flash
Process: Writting flash (1 completed)
Process: Writting flash (2 completed)
Process: Writting flash (3 completed)
Process: Writting flash (4 completed)
Process: Writting flash (5 completed)
(...)
Process: Writting flash (95 completed)
Process: Writting flash (96 completed)
Process: Writting flash (97 completed)
Process: Writting flash (98 completed)
Process: Writting flash completed.
Process: Verify
Process: Verify (1 completed)
Process: Verify (2 completed)
Process: Verify (3 completed)
Process: Verify (4 completed)
(...)
Process: Verify (96 completed)
Process: Verify (97 completed)
Process: Verify (98 completed)
Process: Verify completed.
Verify succeeded.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


