79 unsigned int ui_TmpValue = 0;
80 unsigned int ui_Channel;
82 if (ui_Channel <= 7) {
84 *data = (ui_TmpValue >> ui_Channel) & 0x1;
87 printk(
"\nThe specified channel does not exist\n");
119 unsigned int ui_PortValue = data[0];
120 unsigned int ui_Mask = 0;
121 unsigned int ui_NoOfChannels;
126 switch (ui_NoOfChannels) {
129 *data = (*data >> (2 * ui_PortValue)) & ui_Mask;
133 *data = (*data >> (4 * ui_PortValue)) & ui_Mask;
139 printk(
"\nWrong parameters\n");
175 devpriv->b_OutputMemoryStatus = data[0];
203 unsigned int ui_Temp, ui_Temp1;
205 if (
devpriv->b_OutputMemoryStatus) {
214 data[0] = (data[0] << ui_NoOfChannel) | ui_Temp;
219 switch (ui_NoOfChannel) {
239 data[0] = data[0] | ui_Temp;
251 printk(
"\nSpecified channel not supported\n");
258 data[0] = ~data[0] & 0x1;
260 ui_Temp1 = ui_Temp1 << ui_NoOfChannel;
261 ui_Temp = ui_Temp | ui_Temp1;
262 data[0] = (data[0] << ui_NoOfChannel) ^ 0xffff;
263 data[0] = data[0] & ui_Temp;
269 switch (ui_NoOfChannel) {
272 data[0] = ~data[0] & 0x3;
275 ui_Temp1 << 2 * data[2];
276 ui_Temp = ui_Temp | ui_Temp1;
285 data[0] = ~data[0] & 0xf;
288 ui_Temp1 << 4 * data[2];
289 ui_Temp = ui_Temp | ui_Temp1;
298 data[0] = ~data[0] & 0xff;
301 ui_Temp1 << 8 * data[2];
302 ui_Temp = ui_Temp | ui_Temp1;
324 printk(
"\nSpecified channel not supported\n");
329 printk(
"\nSpecified functionality does not exist\n");
361 unsigned int ui_Temp;
366 *data = (*data >> ui_NoOfChannel) & 0x1;
370 switch (ui_NoOfChannel) {
373 *data = (*data >> (2 * data[1])) & 3;
377 *data = (*data >> (4 * data[1])) & 15;
381 *data = (*data >> (8 * data[1])) & 255;
394 printk(
"\nSpecified channel not supported \n");
433 data[1] = data[1] >> 16;
439 printk(
"\nThe input parameters are wrong\n");
485 printk(
"\nSpecified functionality does not exist\n");