Lines Matching defs:data
132 /* Functions to manage data */
134 static void data_bitset (SANE_Byte * address, SANE_Int mask, SANE_Byte data);
136 static void data_lsb_set (SANE_Byte * address, SANE_Int data, SANE_Int size);
137 static void data_msb_set (SANE_Byte * address, SANE_Int data, SANE_Int size);
139 SANE_Int data);
190 SANE_Byte * data);
192 SANE_Int address, SANE_Int * data);
194 SANE_Int * data);
196 SANE_Int address, SANE_Byte * data,
199 SANE_Byte data);
201 SANE_Int address, SANE_Int data);
203 SANE_Int data);
284 SANE_Int data);
289 SANE_Int sensorchannelcolor, SANE_Int data);
297 SANE_Int data, SANE_Int size);
323 static SANE_Int Refs_Counter_Save (struct st_device *dev, SANE_Byte data);
349 SANE_Byte data);
369 SANE_Int * data);
515 SANE_Int size, SANE_Int data);
517 SANE_Int size, SANE_Int data);
795 SANE_Int data;
799 if (Read_Word (dev->usb_handle, 0xe950, &data) == OK)
801 data = (mode == 0) ? data & 0xffbf : data | 0x40;
802 Write_Word (dev->usb_handle, 0xe950, data);
1085 /* Save data first */
1097 /* Restore data */
1900 GainOffset_Counter_Save (struct st_device *dev, SANE_Byte data)
1904 DBG (DBG_FNC, "> GainOffset_Counter_Save(data=%i):\n", data);
1909 data = min (data, 0x0f);
1910 rst = RTS_EEPROM_WriteByte (dev->usb_handle, 0x0077, data);
1954 SANE_Int a, data, rst;
1972 if (RTS_EEPROM_ReadWord (dev->usb_handle, 0x70 + (2 * a), &data)
1979 offset[a] = data;
2027 /* returns position in scanmodes table where data fits with given arguments */
2060 /* returns position in scanmodes table where data fits with given arguments */
2141 /* returns position in scanmodes table where data fits with given arguments */
2512 Lamp_PWM_DutyCycle_Get (struct st_device *dev, SANE_Int * data)
2521 *data = a & 0x3f;
2525 DBG (DBG_FNC, "- Lamp_PWM_DutyCycle_Get = %i: %i\n", *data, rst);
2667 SANE_Int data, v12dcf8, coord_y, step_type;
2728 /* unknown data */
2863 data = RTS_WriteRegs (dev->usb_handle, cpRegs);
2864 if (data == OK)
2870 rst = (data != OK) ? v12dcf8 : RTS_WaitScanEnd (dev, 20000);
3554 SANE_Byte data;
3559 if (Read_Byte (dev->usb_handle, 0xf8ff, &data) != OK)
3562 data = (data | 1);
3563 if (Write_Byte (dev->usb_handle, 0xf8ff, data) != OK)
3600 data = get_value (SCAN_PARAM, MCLKIOC, 8, usbfile);
3602 data_bitset (&dev->init_regs[0x187], 0xf0, data); /*xxxx---- */
3604 data--;
3606 if (data < 7)
3608 switch (data)
3611 data |= 0xc0;
3614 data |= 0xa0;
3617 data |= 0xe0;
3620 data |= 0x90;
3623 data |= 0xd0;
3626 data |= 0xb0;
3629 data = (data & 0x0f);
3632 dev->init_regs[0x187] = _B0 (data);
3652 resource = cfg_motor_resource_get (&data);
3653 if ((resource != NULL) && (data > 1))
3654 memcpy (&dev->init_regs[0x104], resource, data);
3790 SANE_Byte data;
3791 if (Read_Byte (dev->usb_handle, 0xfe3e, &data) == 0)
3793 *destino = data;
3795 DBG (DBG_FNC, " -> %02x\n", _B0 (data));
3816 SANE_Byte data;
3817 if (Read_Byte (dev->usb_handle, 0xe96f, &data) == OK)
3819 Regs[0x16f] = _B0 (data);
3820 rst = (data >> 6) & 1;
3842 SANE_Byte data;
3843 if (Read_Byte (dev->usb_handle, 0xe800, &data) == OK)
3845 Regs[0x00] = data;
3846 rst = (data >> 7) & 1;
3858 SANE_Byte data;
3868 if (Read_Byte (dev->usb_handle, 0xe800, &data) == OK)
3872 while (((data & 0x80) != 0) && (ticks > GetTickCount ()) && (rst == OK))
3874 rst = Read_Byte (dev->usb_handle, 0xe800, &data);
3907 SANE_Byte data;
3913 if (Read_Byte (dev->usb_handle, 0xe800, &data) == OK)
3915 data = (data & 0x3f) | 0x40; /*01------ */
3916 if (Write_Byte (dev->usb_handle, 0xe800, data) == OK)
3918 data &= 0xbf; /*-0------*/
3919 rst = Write_Byte (dev->usb_handle, 0xe800, data);
3966 SANE_Int data, rst;
3970 if (Read_Word (dev->usb_handle, 0xe958, &data) == OK)
3972 data |= 0x0f;
3973 rst = Write_Word (dev->usb_handle, 0xe958, data);
4002 SANE_Byte data;
4009 if (Read_Byte (dev->usb_handle, 0xe968, &data) == OK)
4010 rst = _B0 (data);
4021 SANE_Byte data;
4028 if (Read_Byte (dev->usb_handle, 0xe96a, &data) == OK)
4029 rst = _B0 (data);
4140 SANE_Byte data;
4151 if (Read_Byte (dev->usb_handle, 0xef09, &data) == OK)
4153 if ((data & 1) == 0)
4170 SANE_Byte data;
4181 if (Read_Byte (dev->usb_handle, 0xf910, &data) == OK)
4183 if ((data & 8) == 0)
4200 SANE_Int data, rst;
4204 if (Read_Word (dev->usb_handle, 0xe954, &data) == OK)
4206 data &= 0xcf; /*--00----*/
4211 data |= 0x30;
4214 data |= 0x20;
4217 data |= 0x10;
4221 buffer[0x154] = _B0 (data);
4345 sent buffer so we just write data */
4429 SANE_Int data = 0;
4470 data = c << 7;
4477 switch (data)
4497 data = 0x200;
4505 (data * 4) * 1024);
4506 DBG (DBG_FNC, " -> data2 = 0x%08x\n", data * 1024);
4563 SANE_Byte data = 0;
4567 if (Read_Byte (dev->usb_handle, 0xe8d9, &data) == OK)
4569 data |= 4;
4570 Write_Byte (dev->usb_handle, 0xe8d9, data);
4579 SANE_Byte data = 0x0f;
4585 if (RTS_EEPROM_ReadByte (dev->usb_handle, 0x77, &data) != OK)
4586 data = 0x0f;
4588 DBG (DBG_FNC, "- GainOffset_Counter_Load: %i\n", _B0 (data));
4590 return data;
5010 unsigned int data;
5020 data = (unsigned int) value;
5022 data = _B0 (data);
5024 return data;
5297 data_bitset (SANE_Byte * address, SANE_Int mask, SANE_Byte data)
5299 /* This function fills mask bits of just a byte with bits given in data */
5302 data <<= 1;
5304 data <<= 2;
5306 data <<= 3;
5308 data <<= 4;
5310 data <<= 5;
5312 data <<= 6;
5314 data <<= 7;
5316 *address = (*address & (0xff - mask)) | (data & mask);
5320 data_wide_bitset (SANE_Byte * address, SANE_Int mask, SANE_Int data)
5325 data = 0111010111
5347 myvalue = _B0 (data << a);
5350 data >>= (8 - a);
5356 data_bitset (address, mymask, _B0 (data));
5357 data >>= 8;
5368 data_lsb_set (SANE_Byte * address, SANE_Int data, SANE_Int size)
5375 address[a] = _B0 (data);
5376 data >>= 8;
5382 data_msb_set (SANE_Byte * address, SANE_Int data, SANE_Int size)
5390 address[a] = _B0 (data);
5391 data >>= 8;
5454 SANE_Int data;
5456 data = data_lsb_get (&Regs[0x154], 2) & 0xfe7f;
5457 data = (gainmode == FALSE) ? data | 0x0040 : data & 0xffbf;
5465 data |= 0x0100;
5468 data |= 0x0180;
5472 data |= 0x80;
5474 data |= 0x0180;
5478 data_lsb_set (&Regs[0x0154], data, 2);
5486 SANE_Int data;
5491 data = 0;
5492 Lamp_PWM_DutyCycle_Get (dev, &data);
5493 data = _B0 (data);
5495 DBG (DBG_FNC, "-> Pwm used = %i\n", data);
6232 /* Send data */
6241 /* Retrieve data */
6246 /* Check data */
6327 SANE_Byte data;
6331 data = 0;
6348 Read_Byte (dev->usb_handle, 0xe801, &data);
6349 if ((data & 0x02) == 0)
6383 SANE_Byte data;
6389 data = 0;
6392 if (Read_Byte (dev->usb_handle, 0xe9a1, &data) == OK)
6393 binarythresholdh = data;
7541 /* bit 1 if data is under thresholdh value */
7720 SANE_Byte data;
7723 if (Read_Byte (dev->usb_handle, 0xe812, &data) == OK)
7725 data = data >> 6;
7726 if (data != 0)
7727 rd->Channels_per_dot = data;
7731 if (Read_Byte (dev->usb_handle, 0xee0b, &data) == OK)
7732 if (((data & 0x40) != 0) && ((data & 0x08) == 0))
7741 /* Is there any data to read from scanner? */
7744 /* Try to read from scanner all possible data to fill DMABuffer */
7781 /* We must wait for scanner to get data */
7815 /* Lets copy data into DMABuffer if it's necessary */
7866 /* is there any data read from scanner? */
7893 /* if there isn't any data in DMABuffer we can point RDStart
7899 /* in case of all data is read we return OK with bytes_transferred = 0 */
8436 /* Let scanner some time to store some data */
8972 /* set unknown data */
9009 /* set unknown data */
9024 /* set unknown data */
9485 SANE_Int data)
9498 if (RTS_DMA_Enable_Write (dev, 0x0004, size, data) == OK)
9499 /* Send data */
9511 SANE_Int data)
9524 if (RTS_DMA_Enable_Read (dev, 0x0004, size, data) == OK)
9525 /* Retrieve data */
9537 SANE_Int sensorchannelcolor, SANE_Int * tablepos, SANE_Int data)
9547 05EEF988 00000000 \data = 00000000
9562 "+ fn3330(*Regs, *calbuffers, sensorchannelcolor=%i, *tablepos, data=%i):\n",
9563 sensorchannelcolor, data);
9575 if (_B0 (data) == 0)
9592 if (_B0 (data) == 0)
9681 USHORT * table, SANE_Int sensorchannelcolor, SANE_Int data)
9687 05FEF9BC |data = 00000000
9694 "+ fn3730(*calbuffers, *Regs, *table, sensorchannelcolor=%i, data=%i):\n",
9695 sensorchannelcolor, data);
9698 rst = fn3330 (dev, Regs, calbuffers, sensorchannelcolor, pos, data);
9738 /* Send data */
9801 /* Send data */
9884 White shading formula : 2000H x Target / (Wn-Dn) = White Gain data ----- for 8 times system
9885 White shading formula : 4000H x Target / (Wn-Dn) = White Gain data ----- for 4 times system
10112 Reading_BufferSize_Notify (struct st_device *dev, SANE_Int data,
10117 DBG (DBG_FNC, "+ Reading_BufferSize_Notify(data=%i, size=%i):\n", data,
10120 rst = RTS_DMA_Enable_Read (dev, 0x0008, size, data);
11193 SANE_Byte data = 15;
11199 if (RTS_EEPROM_ReadByte (dev->usb_handle, 0x78, &data) != OK)
11200 data = 15;
11202 DBG (DBG_FNC, "- Refs_Counter_Load: %i\n", _B0 (data));
11204 return data;
11208 Refs_Counter_Save (struct st_device *dev, SANE_Byte data)
11212 DBG (DBG_FNC, "+ Refs_Counter_Save(data=%i):\n", data);
11217 if (data > 15)
11218 data = 15;
11220 rst = RTS_EEPROM_WriteByte (dev->usb_handle, 0x78, data);
11231 SANE_Byte data;
11235 data = Refs_Counter_Load (dev) + 1;
11237 if (data >= 15)
11238 data = 0;
11240 Refs_Counter_Save (dev, data);
11242 DBG (DBG_FNC, "- Refs_Counter_Inc() : Count=%i\n", data);
11638 /* three more values to read image data after getting image from scanner */
11706 /* process image data */
12100 SANE_Int data;
12104 if (RTS_EEPROM_ReadWord (dev->usb_handle, 0x6a, &data) == OK)
12106 *x = data;
12107 if (RTS_EEPROM_ReadWord (dev->usb_handle, 0x6c, &data) == OK)
12109 *y = data;
12110 if (RTS_EEPROM_ReadWord (dev->usb_handle, 0x6e, &data) == OK)
12112 if ((_B0 (*y + *x + data)) == 0x5a)
12141 SANE_Byte data = _B0 (0x5a - (start_pos + left_leading));
12142 ret = RTS_EEPROM_WriteByte (dev->usb_handle, 0x6e, data);
14092 SANE_Byte data;
14096 if (Read_Byte (dev->usb_handle, 0xfe11, &data) == OK)
14097 rst = (data & 1);
14211 if (Read_Byte(dev->usb_handle, 0xe800, &data) == OK)
14213 data |= 0x20;
14214 if (Write_Byte(dev->usb_handle, 0xe800, data) == OK)
14216 data &= 0xdf;
14217 rst = Write_Byte(dev->usb_handle, 0xe800, data);
14304 RTS_EEPROM_WriteByte (USB_Handle usb_handle, SANE_Int address, SANE_Byte data)
14308 DBG (DBG_FNC, "+ RTS_EEPROM_WriteByte(address=%04x, data=%i):\n", address,
14309 data);
14311 rst = IWrite_Byte (usb_handle, address, data, 0x200, 0x200);
14319 RTS_EEPROM_ReadWord (USB_Handle usb_handle, SANE_Int address, SANE_Int * data)
14323 DBG (DBG_FNC, "+ RTS_EEPROM_ReadWord(address=%04x, data):\n", address);
14325 rst = IRead_Word (usb_handle, address, data, 0x200);
14334 SANE_Byte * data)
14338 DBG (DBG_FNC, "+ RTS_EEPROM_ReadByte(address=%04x, data):\n", address);
14340 rst = IRead_Byte (usb_handle, address, data, 0x200);
14348 RTS_EEPROM_WriteWord (USB_Handle usb_handle, SANE_Int address, SANE_Int data)
14352 DBG (DBG_FNC, "+ RTS_EEPROM_WriteWord(address=%04x, data=%i):\n", address,
14353 data);
14355 rst = IWrite_Word (usb_handle, address, data, 0x0200);
14364 SANE_Int * data)
14368 DBG (DBG_FNC, "+ RTS_EEPROM_ReadInteger(address=%04x, data):\n", address);
14370 rst = IRead_Integer (usb_handle, address, data, 0x200);
14379 SANE_Int data)
14383 DBG (DBG_FNC, "+ RTS_EEPROM_WriteInteger(address=%04x, data):\n", address);
14385 rst = IWrite_Integer (usb_handle, address, data, 0x200);
14394 SANE_Byte * data, SANE_Int size)
14398 DBG (DBG_FNC, "+ RTS_EEPROM_WriteBuffer(address=%04x, data, size=%i):\n",
14401 rst = IWrite_Buffer (usb_handle, address, data, size, 0x200);
14544 SANE_Int data;
14571 data =
14575 sumatorio += data;
14595 data =
14598 prueba = data;
14627 data =
14630 sumatorio = data;
14791 SANE_Int data = 0x0530, a;
14798 rst = IWrite_Word (dev->usb_handle, 0x0000, data, 0x0800);