GL124 DAC and SENSOR setup changes

merge-requests/1/head
Stéphane Voltz 2016-02-21 09:48:26 +01:00
rodzic f56ffa63b9
commit 8f938f2d00
3 zmienionych plików z 39 dodań i 9 usunięć

Wyświetl plik

@ -168,7 +168,7 @@ static Genesys_Frontend Wolfson[] = {
{DAC_G4050,
{0x00, 0x23, 0x24, 0x1f}
, {0x00, 0x00, 0x00}
, {0x45, 0x45, 0x45} /* 0x20, 0x21, 0x22 */
, {0x45, 0x45, 0x45} /* 0x20, 0x21, 0x22 */
, {0x4b, 0x4b, 0x4b} /* 0x28, 0x29, 0x2a */
, {0x00,0x00,0x00}
}
@ -682,10 +682,10 @@ static Genesys_Sensor Sensor[] = {
/* reg 0x10 - 0x15 : EXPR, EXPG and EXPB */
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* reg 0x16 - 0x1d */
0x10, 0x04, 0x00, 0x01, 0x30, 0x00, 0x02, 0x01 },
0x15, 0x04, 0x00, 0x01, 0x30, 0x00, 0x02, 0x01 },
/* reg 0x52 - 0x5e */
{
0x00, 0x02, 0x04, 0x06, 0x04, 0x04, 0x04, 0x04,
0x04, 0x06, 0x00, 0x02, 0x04, 0x04, 0x04, 0x04,
0x1a, 0x00, 0xc0, 0x00, 0x00
}
,

Wyświetl plik

@ -356,10 +356,18 @@ gl124_init_registers (Genesys_Device * dev)
SETREG (0x01,0xa2); /* + REG01_SHDAREA */
SETREG (0x02,0x90);
SETREG (0x03,0x50);
SETREG (0x03,0x50 & ~REG03_AVEENB);
SETREG (0x04,0x03);
SETREG (0x05,0x00);
SETREG (0x06,0x50 | REG06_GAIN4);
if(dev->model->ccd_type==CIS_CANONLIDE120)
{
SETREG (0x06,0x50);
SETREG (0x07,0x00);
}
else
{
SETREG (0x03,0x50 & ~REG03_AVEENB);
SETREG (0x06,0x50 | REG06_GAIN4);
}
SETREG (0x09,0x00);
SETREG (0x0a,0xc0);
SETREG (0x0b,0x2a);
@ -381,7 +389,14 @@ gl124_init_registers (Genesys_Device * dev)
SETREG (0x1f,0x00);
SETREG (0x20,0x15);
SETREG (0x21,0x00);
SETREG (0x22,0x02);
if(dev->model->ccd_type!=CIS_CANONLIDE120)
{
SETREG (0x22,0x02);
}
else
{
SETREG (0x22,0x14);
}
SETREG (0x23,0x00);
SETREG (0x24,0x00);
SETREG (0x25,0x00);
@ -536,6 +551,15 @@ gl124_init_registers (Genesys_Device * dev)
SETREG (0xcd,0x00);
SETREG (0xce,0x00);
*/
if(dev->model->ccd_type==CIS_CANONLIDE120)
{
SETREG (0xc5,0x20);
SETREG (0xc6,0xeb);
SETREG (0xc7,0x20);
SETREG (0xc8,0xeb);
SETREG (0xc9,0x20);
SETREG (0xca,0xeb);
}
/* memory layout
SETREG (0xd0,0x0a);
@ -1003,7 +1027,12 @@ gl124_init_motor_regs_scan (Genesys_Device * dev,
/** @brief copy sensor specific settings
* Set up register set for the given sensor resolution.
* Set up register set for the given sensor resolution. Values are from the device table
* in genesys_devices.c for registers:
* [0x16 ... 0x1d]
* [0x52 ... 0x5e]
* Other come from the specific device sensor table in genesys_gl124.h:
* 0x18, 0x20, 0x61, 0x98 and
* @param dev device to set up
* @param regs register set to modify
* @param dpi resolution of the sensor during scan

Wyświetl plik

@ -537,6 +537,7 @@ typedef struct
/** @brief gpio layout
* describes initial gpio settings for a given model
* registers 0x31 to 0x38
*/
static Gpio_layout gpios[]={
/* LiDE 110 */
@ -627,7 +628,7 @@ static Sensor_Profile sensors[]={
{CIS_CANONLIDE110, 2400, 0, 20864, 0x1e, 0x9f, 0x55, 5168, 163, 4679, 6839, 8401, 6859, order_0213, 0x00, 0x06, 0x20, 0x24},
/* LiDE 120 */
{CIS_CANONLIDE120, 600, 1, 4608, 0x0f, 0x9f, 0x55, 2552, 112, 94, 1644, 1994, 1844, NULL , 0x00, 0x02, 0x20, 0x21},
{CIS_CANONLIDE120, 600, 1, 4608, 0x0f, 0x00, 0x55, 2552, 112, 94, 1644, 1994, 1844, NULL , 0x00, 0x02, 0x20, 0x21},
{CIS_CANONLIDE120, 600, 0, 5360, 0x0f, 0x00, 0x55, 5104, 139, 94, 1644, 1994, 1844, NULL , 0x00, 0x02, 0x20, 0x21},
{CIS_CANONLIDE120, 1200, 0, 10528, 0x0f, 0x9f, 0x55, 5104, 163, 94, 1644, 1994, 1844, order_01 , 0x00, 0x08, 0x20, 0x22},
{CIS_CANONLIDE120, 2400, 0, 20864, 0x0f, 0x9f, 0x55, 5104, 163, 4679, 6839, 8401, 6859, order_0213, 0x00, 0x06, 0x20, 0x24},
@ -648,7 +649,7 @@ static Sensor_Profile sensors[]={
#define MOVE_DPI 200
#define MOVE_EXPOSURE 2304
/** @reference slope tables
/** @brief reference slope tables
* slope table directly extracted from USB logs, with a 'termination' value of 0.
*/
static uint32_t lide210_fast[] = { 62496, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2051, 1432, 1372, 1323, 1280, 1246, 1216, 1188, 1163, 1142, 1121, 1101, 1084, 1068, 1051, 1036, 1020, 1007, 995, 983, 971, 959, 949, 938, 929, 917, 908, 900, 891, 882, 874, 866, 857, 849, 843, 835, 829, 821, 816, 808, 802, 795, 789, 784, 778, 773, 765, 760, 755, 749, 744, 739, 734, 731, 726, 721, 716, 711, 707, 702, 698, 693, 690, 685, 682, 677, 672, 669, 665, 662, 657, 654, 650, 647, 644, 639, 637, 632, 629, 626, 622, 619, 617, 614, 610, 607, 604, 601, 599, 595, 592, 589, 587, 584, 581, 579, 576, 572, 570, 567, 564, 562, 559, 557, 554, 552, 549, 547, 544, 542, 539, 538, 536, 533, 531, 529, 526, 524, 522, 519, 518, 516, 513, 511, 509, 506, 505, 503, 501, 498, 497, 495, 493, 491, 490, 487, 485, 483, 482, 480, 477, 476, 474, 472, 470, 469, 467, 465, 464, 462, 460, 458, 456, 455, 453, 451, 450, 448, 447, 445, 444, 442, 440, 439, 437, 436, 434, 433, 431, 430, 428, 427, 425, 423, 422, 420, 419, 417, 417, 415, 414, 413, 411, 410, 408, 407, 405, 404, 402, 401, 400, 399, 398, 396, 395, 393, 392, 391, 390, 389, 387, 386, 385, 383, 382, 381, 380, 379, 377, 376, 375, 374, 373, 371, 370, 369, 368, 367, 366, 364, 363, 363, 361, 360, 359, 358, 357, 356, 355, 353, 352, 352, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 335, 335, 0};