79 unsigned int ui_TmpValue = 0;
80 unsigned int ui_Channel;
82 if (ui_Channel <= 7) {
86 *data = (ui_TmpValue >> ui_Channel) & 0x1;
121 unsigned int ui_PortValue = data[0];
122 unsigned int ui_Mask = 0;
123 unsigned int ui_NoOfChannels;
128 switch (ui_NoOfChannels) {
131 *data = (*data >> (2 * ui_PortValue)) & ui_Mask;
135 *data = (*data >> (4 * ui_PortValue)) & ui_Mask;
141 printk(
"\nWrong parameters\n");
177 devpriv->b_OutputMemoryStatus = data[0];
205 unsigned int ui_Temp, ui_Temp1;
210 if (
devpriv->b_OutputMemoryStatus) {
219 data[0] = (data[0] << ui_NoOfChannel) | ui_Temp;
222 printk(
"EL311003 : d=%d @=%x\n", data[0],
228 switch (ui_NoOfChannel) {
243 data[0] = data[0] | ui_Temp;
255 printk(
"EL311003 : d=%d @=%x\n", data[0],
259 printk(
"\nSpecified channel not supported\n");
266 data[0] = ~data[0] & 0x1;
268 ui_Temp1 = ui_Temp1 << ui_NoOfChannel;
269 ui_Temp = ui_Temp | ui_Temp1;
270 data[0] = (data[0] << ui_NoOfChannel) ^ 0xff;
271 data[0] = data[0] & ui_Temp;
275 printk(
"EL311003 : d=%d @=%x\n", data[0],
281 switch (ui_NoOfChannel) {
284 data[0] = ~data[0] & 0x3;
287 ui_Temp1 << 2 * data[2];
288 ui_Temp = ui_Temp | ui_Temp1;
297 data[0] = ~data[0] & 0xf;
300 ui_Temp1 << 4 * data[2];
301 ui_Temp = ui_Temp | ui_Temp1;
323 printk(
"EL311003 : d=%d @=%x\n",
329 printk(
"\nSpecified channel not supported\n");
334 printk(
"\nSpecified functionality does not exist\n");
366 unsigned int ui_Temp;
371 *data = (*data >> ui_NoOfChannel) & 0x1;
375 switch (ui_NoOfChannel) {
378 *data = (*data >> (2 * data[1])) & 3;
382 *data = (*data >> (4 * data[1])) & 15;
395 printk(
"\nSpecified channel not supported \n");
434 data[1] = data[1] >> 16;
440 printk(
"\nThe input parameters are wrong\n");
486 printk(
"\nSpecified functionality does not exist\n");