Commit 0110c443 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman
Browse files

Staging: comedi: remove C99 comments in APCI1710_Pwm.c

parent c47375f3
Loading
Loading
Loading
Loading
+424 −424
Original line number Diff line number Diff line
@@ -79,29 +79,29 @@ int i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice

	switch (b_ConfigType) {
	case APCI1710_PWM_INIT:
		i_ReturnValue = i_APCI1710_InitPWM(dev, (unsigned char) CR_AREF(insn->chanspec),	//  b_ModulNbr
			(unsigned char) data[0],	//b_PWM
			(unsigned char) data[1],	// b_ClockSelection
			(unsigned char) data[2],	// b_TimingUnit
			(unsigned int) data[3],	//ul_LowTiming
			(unsigned int) data[4],	//ul_HighTiming
			(unsigned int *) & data[0],	//pul_RealLowTiming
			(unsigned int *) & data[1]	//pul_RealHighTiming
		i_ReturnValue = i_APCI1710_InitPWM(dev, (unsigned char) CR_AREF(insn->chanspec),	/*   b_ModulNbr */
			(unsigned char) data[0],	/* b_PWM */
			(unsigned char) data[1],	/*  b_ClockSelection */
			(unsigned char) data[2],	/*  b_TimingUnit */
			(unsigned int) data[3],	/* ul_LowTiming */
			(unsigned int) data[4],	/* ul_HighTiming */
			(unsigned int *) & data[0],	/* pul_RealLowTiming */
			(unsigned int *) & data[1]	/* pul_RealHighTiming */
			);
		break;

	case APCI1710_PWM_GETINITDATA:
		i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (unsigned char) CR_AREF(insn->chanspec),	// b_ModulNbr
			(unsigned char) data[0],	//b_PWM
			(unsigned char *) & data[0],	//pb_TimingUnit
			(unsigned int *) & data[1],	//pul_LowTiming
			(unsigned int *) & data[2],	//pul_HighTiming
			(unsigned char *) & data[3],	// pb_StartLevel
			(unsigned char *) & data[4],	// pb_StopMode
			(unsigned char *) & data[5],	// pb_StopLevel
			(unsigned char *) & data[6],	// pb_ExternGate
			(unsigned char *) & data[7],	// pb_InterruptEnable
			(unsigned char *) & data[8]	// pb_Enable
		i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (unsigned char) CR_AREF(insn->chanspec),	/*  b_ModulNbr */
			(unsigned char) data[0],	/* b_PWM */
			(unsigned char *) & data[0],	/* pb_TimingUnit */
			(unsigned int *) & data[1],	/* pul_LowTiming */
			(unsigned int *) & data[2],	/* pul_HighTiming */
			(unsigned char *) & data[3],	/*  pb_StartLevel */
			(unsigned char *) & data[4],	/*  pb_StopMode */
			(unsigned char *) & data[5],	/*  pb_StopLevel */
			(unsigned char *) & data[6],	/*  pb_ExternGate */
			(unsigned char *) & data[7],	/*  pb_InterruptEnable */
			(unsigned char *) & data[8]	/*  pb_Enable */
			);
		break;

@@ -1397,30 +1397,30 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
							DPRINTK("Low base timing selection is wrong\n");
							i_ReturnValue = -7;
						}
					}	// if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4))
					}	/*  if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) */
					else {
						/**********************************/
						/* Timing unit selection is wrong */
						/**********************************/
						DPRINTK("Timing unit selection is wrong\n");
						i_ReturnValue = -6;
					}	// if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4))
				}	// if ((b_ClockSelection == APCI1710_30MHZ) || (b_ClockSelection == APCI1710_33MHZ) || (b_ClockSelection == APCI1710_40MHZ))
					}	/*  if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) */
				}	/*  if ((b_ClockSelection == APCI1710_30MHZ) || (b_ClockSelection == APCI1710_33MHZ) || (b_ClockSelection == APCI1710_40MHZ)) */
				else {
					/*******************************/
					/* The selected clock is wrong */
					/*******************************/
					DPRINTK("The selected clock is wrong\n");
					i_ReturnValue = -5;
				}	// if ((b_ClockSelection == APCI1710_30MHZ) || (b_ClockSelection == APCI1710_33MHZ) || (b_ClockSelection == APCI1710_40MHZ))
			}	// if (b_PWM >= 0 && b_PWM <= 1)
				}	/*  if ((b_ClockSelection == APCI1710_30MHZ) || (b_ClockSelection == APCI1710_33MHZ) || (b_ClockSelection == APCI1710_40MHZ)) */
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
			else {
				/******************************/
				/* Tor PWM selection is wrong */
				/******************************/
				DPRINTK("Tor PWM selection is wrong\n");
				i_ReturnValue = -4;
			}	// if (b_PWM >= 0 && b_PWM <= 1)
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
		} else {
			/**********************************/
			/* The module is not a PWM module */
@@ -1634,22 +1634,22 @@ int i_APCI1710_GetPWMInitialisation(struct comedi_device * dev,
						s_ModuleInfo[b_ModulNbr].
						s_PWMModuleInfo.
						s_PWMInfo[b_PWM].b_TimingUnit;
				}	// if (dw_Status & 0x10)
				}	/*  if (dw_Status & 0x10) */
				else {
					/***********************/
					/* PWM not initialised */
					/***********************/
					DPRINTK("PWM not initialised\n");
					i_ReturnValue = -5;
				}	// if (dw_Status & 0x10)
			}	// if (b_PWM >= 0 && b_PWM <= 1)
				}	/*  if (dw_Status & 0x10) */
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
			else {
				/******************************/
				/* Tor PWM selection is wrong */
				/******************************/
				DPRINTK("Tor PWM selection is wrong\n");
				i_ReturnValue = -4;
			}	// if (b_PWM >= 0 && b_PWM <= 1)
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
		} else {
			/**********************************/
			/* The module is not a PWM module */
@@ -1817,7 +1817,7 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
	unsigned int dw_Status;
	unsigned int dw_Command;

	devpriv->tsk_Current = current;	// Save the current process task structure
	devpriv->tsk_Current = current;	/*  Save the current process task structure */
	/**************************/
	/* Test the module number */
	/**************************/
@@ -1953,7 +1953,7 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
										/* Enable the PWM */
										/******************/
										outl(1, devpriv->s_BoardInfos.ui_Address + 12 + (20 * b_PWM) + (64 * b_ModulNbr));
									}	// if (b_InterruptEnable == APCI1710_ENABLE || b_InterruptEnable == APCI1710_DISABLE)
									}	/*  if (b_InterruptEnable == APCI1710_ENABLE || b_InterruptEnable == APCI1710_DISABLE) */
									else {
										/********************************/
										/* Interrupt parameter is wrong */
@@ -1962,8 +1962,8 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
										i_ReturnValue
											=
											-10;
									}	// if (b_InterruptEnable == APCI1710_ENABLE || b_InterruptEnable == APCI1710_DISABLE)
								}	// if (b_ExternGate >= 0 && b_ExternGate <= 1)
									}	/*  if (b_InterruptEnable == APCI1710_ENABLE || b_InterruptEnable == APCI1710_DISABLE) */
								}	/*  if (b_ExternGate >= 0 && b_ExternGate <= 1) */
								else {
									/*****************************************/
									/* Extern gate signal selection is wrong */
@@ -1972,8 +1972,8 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
									i_ReturnValue
										=
										-9;
								}	// if (b_ExternGate >= 0 && b_ExternGate <= 1)
							}	// if (b_StopLevel >= 0 && b_StopLevel <= 2)
								}	/*  if (b_ExternGate >= 0 && b_ExternGate <= 1) */
							}	/*  if (b_StopLevel >= 0 && b_StopLevel <= 2) */
							else {
								/*************************************/
								/* PWM stop level selection is wrong */
@@ -1981,39 +1981,39 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
								DPRINTK("PWM stop level selection is wrong\n");
								i_ReturnValue =
									-8;
							}	// if (b_StopLevel >= 0 && b_StopLevel <= 2)
						}	// if (b_StopMode >= 0 && b_StopMode <= 1)
							}	/*  if (b_StopLevel >= 0 && b_StopLevel <= 2) */
						}	/*  if (b_StopMode >= 0 && b_StopMode <= 1) */
						else {
							/************************************/
							/* PWM stop mode selection is wrong */
							/************************************/
							DPRINTK("PWM stop mode selection is wrong\n");
							i_ReturnValue = -7;
						}	// if (b_StopMode >= 0 && b_StopMode <= 1)
					}	// if (b_StartLevel >= 0 && b_StartLevel <= 1)
						}	/*  if (b_StopMode >= 0 && b_StopMode <= 1) */
					}	/*  if (b_StartLevel >= 0 && b_StartLevel <= 1) */
					else {
						/**************************************/
						/* PWM start level selection is wrong */
						/**************************************/
						DPRINTK("PWM start level selection is wrong\n");
						i_ReturnValue = -6;
					}	// if (b_StartLevel >= 0 && b_StartLevel <= 1)
				}	// if (dw_Status & 0x10)
					}	/*  if (b_StartLevel >= 0 && b_StartLevel <= 1) */
				}	/*  if (dw_Status & 0x10) */
				else {
					/***********************/
					/* PWM not initialised */
					/***********************/
					DPRINTK("PWM not initialised\n");
					i_ReturnValue = -5;
				}	// if (dw_Status & 0x10)
			}	// if (b_PWM >= 0 && b_PWM <= 1)
				}	/*  if (dw_Status & 0x10) */
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
			else {
				/******************************/
				/* Tor PWM selection is wrong */
				/******************************/
				DPRINTK("Tor PWM selection is wrong\n");
				i_ReturnValue = -4;
			}	// if (b_PWM >= 0 && b_PWM <= 1)
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
		} else {
			/**********************************/
			/* The module is not a PWM module */
@@ -2105,30 +2105,30 @@ int i_APCI1710_DisablePWM(struct comedi_device * dev, unsigned char b_ModulNbr,
							ui_Address + 12 +
							(20 * b_PWM) +
							(64 * b_ModulNbr));
					}	// if (dw_Status & 0x1)
					}	/*  if (dw_Status & 0x1) */
					else {
						/*******************/
						/* PWM not enabled */
						/*******************/
						DPRINTK("PWM not enabled\n");
						i_ReturnValue = -6;
					}	// if (dw_Status & 0x1)
				}	// if (dw_Status & 0x10)
					}	/*  if (dw_Status & 0x1) */
				}	/*  if (dw_Status & 0x10) */
				else {
					/***********************/
					/* PWM not initialised */
					/***********************/
					DPRINTK(" PWM not initialised\n");
					i_ReturnValue = -5;
				}	// if (dw_Status & 0x10)
			}	// if (b_PWM >= 0 && b_PWM <= 1)
				}	/*  if (dw_Status & 0x10) */
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
			else {
				/******************************/
				/* Tor PWM selection is wrong */
				/******************************/
				DPRINTK("Tor PWM selection is wrong\n");
				i_ReturnValue = -4;
			}	// if (b_PWM >= 0 && b_PWM <= 1)
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
		} else {
			/**********************************/
			/* The module is not a PWM module */
@@ -3372,30 +3372,30 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
							DPRINTK("Low base timing selection is wrong\n");
							i_ReturnValue = -7;
						}
					}	// if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4))
					}	/*  if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) */
					else {
						/**********************************/
						/* Timing unit selection is wrong */
						/**********************************/
						DPRINTK("Timing unit selection is wrong\n");
						i_ReturnValue = -6;
					}	// if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4))
				}	// if (dw_Status & 0x10)
					}	/*  if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) */
				}	/*  if (dw_Status & 0x10) */
				else {
					/***********************/
					/* PWM not initialised */
					/***********************/
					DPRINTK("PWM not initialised\n");
					i_ReturnValue = -5;
				}	// if (dw_Status & 0x10)
			}	// if (b_PWM >= 0 && b_PWM <= 1)
				}	/*  if (dw_Status & 0x10) */
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
			else {
				/******************************/
				/* Tor PWM selection is wrong */
				/******************************/
				DPRINTK("Tor PWM selection is wrong\n");
				i_ReturnValue = -4;
			}	// if (b_PWM >= 0 && b_PWM <= 1)
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
		} else {
			/**********************************/
			/* The module is not a PWM module */
@@ -3514,7 +3514,7 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su
						*pb_ExternGateStatus =
							(unsigned char) ((dw_Status >> 6)
							& 1);
					}	// if (dw_Status & 0x1)
					}	/*  if (dw_Status & 0x1) */
					else {
						/*******************/
						/* PWM not enabled */
@@ -3522,8 +3522,8 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su

						DPRINTK("PWM not enabled \n");
						i_ReturnValue = -6;
					}	// if (dw_Status & 0x1)
				}	// if (dw_Status & 0x10)
					}	/*  if (dw_Status & 0x1) */
				}	/*  if (dw_Status & 0x10) */
				else {
					/***********************/
					/* PWM not initialised */
@@ -3531,8 +3531,8 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su

					DPRINTK("PWM not initialised\n");
					i_ReturnValue = -5;
				}	// if (dw_Status & 0x10)
			}	// if (b_PWM >= 0 && b_PWM <= 1)
				}	/*  if (dw_Status & 0x10) */
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
			else {
				/******************************/
				/* Tor PWM selection is wrong */
@@ -3540,7 +3540,7 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su

				DPRINTK("Tor PWM selection is wrong\n");
				i_ReturnValue = -4;
			}	// if (b_PWM >= 0 && b_PWM <= 1)
			}	/*  if (b_PWM >= 0 && b_PWM <= 1) */
		} else {
			/**********************************/
			/* The module is not a PWM module */