#  register settings mt9m001
#  PHYTEC 2011, V1.3

#  set MT9M001 GAIN (AGC)
#  ======================
#  set global GAIN manual
#0x5D,0x35,0x0008       # set gain = 1.00 (default)
#0x5D,0x35,0x0010       # set gain = 2.00
0x5D,0x35,0x0018       # set gain = 3.00
#0x5D,0x35,0x0020       # set gain = 4.00
#0x5D,0x35,0x0054       # set gain = 5.00
#0x5D,0x35,0x0058       # set gain = 6.00
#0x5D,0x35,0x005C       # set gain = 7.00
#0x5D,0x35,0x0060       # set gain = 8.00
#0x5D,0x35,0x0061       # set gain = 9.00
#0x5D,0x35,0x0062       # set gain = 10.00
#0x5D,0x35,0x0063       # set gain = 11.00
#0x5D,0x35,0x0064       # set gain = 12.00
#0x5D,0x35,0x0065       # set gain = 13.00
#0x5D,0x35,0x0066       # set gain = 14.00
#0x5D,0x35,0x0067       # set gain = 15.00


#  set MT9M001 integration rows(AEC)
#  =================================
#  if  value > (height + V Blanking -2) the framerate is affected
# (extra rows are inserted automatically to lower the framerate according to the exposure settings)
#
#  set integration rows manual
0x5D,0x09,1050          # set number of rows = [0..16383]
# warning (only linux): With the gstreamer plug-in is the number of rows not adjustable.
# The number of rows is preset at 1050 rows! For setting the number of rows
# use the v4l function "V4L2_CID_EXPOSURE" (not usable at gstreamer).


#  set MT9M001 BLC
#  ===============
#  set BLC automatic
0x5D,0x62,0xFFFE,a     # automatic = on (default)

#  set BLC manual
#0x5D,0x62,0x0001,o     # automatic = off
#0x5D,0x60,0          # set black level calibration value for even row and even column = [-225..255]  (-256 not defined)
#0x5D,0x61,0          # set black level calibration value for odd row and odd column = [-225..255]  (-256 not defined)
#0x5D,0x63,0          # set black level calibration value for even row and odd column = [-225..255]  (-256 not defined)
#0x5D,0x64,0          # set black level calibration value for odd row and even column = [-225..255]  (-256 not defined)


#  set MT9M001 MIRROR
#  ==================
#  set flip row and/or column
0x5D,0x20,0x3FFF,a     # without flip
#0x5D,0x20,0x8000,o     # flip row
#0x5D,0x20,0x4000,o     # flip column
#0x5D,0x20,0xc000,o     # flip row and column


#  set MT9M001 TESTPATTERN
#  =======================
#  set testpattern off
0x5D,0x07,0xFFBF,a     # testpattern off (default)

#  set testpattern
#0x5D,0x32,0x0155     # generates 01 0101 0101 data at D[0..9], value for even column, odd column is inverted
#0x5D,0x32,0x02AA     # generates 10 1010 1010 data at D[0..9], value for even column, odd column is inverted
#0x5D,0x07,0x0040,o     #  testpattern on
# warning (only linux): Only useable with PHYTEC patch for mt9m001 (fix-the-testpattern-bit-overwritte)
#                       Otherwise has settings of this parameters no effect.


