56 static unsigned int ui_InterruptData, ui_Type;
85 unsigned int ul_Command = 0;
88 if ((data[0] != 0) && (data[0] != 1)) {
90 "Not a valid Data !!! ,Data should be 1 or 0\n");
101 ul_Command = ul_Command | 0x1;
104 ul_Command = ul_Command & 0xFFFFFFFE;
107 ul_Command = ul_Command | 0x2;
110 ul_Command = ul_Command & 0xFFFFFFFD;
140 unsigned int ui_Temp, ui_Temp1;
142 if (
devpriv->b_OutputMemoryStatus) {
151 data[0] = (data[0] << ui_NoOfChannel) | ui_Temp;
156 switch (ui_NoOfChannel) {
182 data[0] = data[0] | ui_Temp;
195 printk(
"\nSpecified channel not supported\n");
202 data[0] = ~data[0] & 0x1;
204 ui_Temp1 = ui_Temp1 << ui_NoOfChannel;
205 ui_Temp = ui_Temp | ui_Temp1;
207 (data[0] << ui_NoOfChannel) ^
209 data[0] = data[0] & ui_Temp;
215 switch (ui_NoOfChannel) {
218 data[0] = ~data[0] & 0x3;
221 ui_Temp1 << 2 * data[2];
222 ui_Temp = ui_Temp | ui_Temp1;
227 0xffffffff) & ui_Temp;
231 data[0] = ~data[0] & 0xf;
234 ui_Temp1 << 4 * data[2];
235 ui_Temp = ui_Temp | ui_Temp1;
240 0xffffffff) & ui_Temp;
244 data[0] = ~data[0] & 0xff;
247 ui_Temp1 << 8 * data[2];
248 ui_Temp = ui_Temp | ui_Temp1;
253 0xffffffff) & ui_Temp;
257 data[0] = ~data[0] & 0xffff;
262 ui_Temp = ui_Temp | ui_Temp1;
267 0xffffffff) & ui_Temp;
284 printk(
"\nSpecified channel not supported\n");
289 printk(
"\nSpecified functionality does not exist\n");
319 unsigned int ui_Temp;
320 unsigned int ui_NoOfChannel;
325 *data = (*data >> ui_NoOfChannel) & 0x1;
329 switch (ui_NoOfChannel) {
332 *data = (*data >> (2 * data[1])) & 3;
336 *data = (*data >> (4 * data[1])) & 15;
340 *data = (*data >> (8 * data[1])) & 255;
344 *data = (*data >> (16 * data[1])) & 65535;
357 printk(
"\nSpecified channel not supported \n");
396 printk(
"\nThe input parameters are wrong\n");
442 printk(
"\nSpecified functionality does not exist\n");
504 printk(
"\nInterrupt from unKnown source\n");
572 devpriv->b_DigitalOutputRegister = 0;