E_SWITCH switch_Get ( void   )

This function reads the ADC channel assigned to the motor switch. If the switch is pressed ON will be returned; otherwise OFF.

See also:
adc_Read()
Returns:
Condition of the motor switch
Return values:
E_SWITCH(ON or OFF)

Definition at line 96 of file switch.c.

References adc_Read(), ADC_SWITCH, OFF, and ON.

{
  UINT16 u16Help = adc_Read(ADC_SWITCH);
  if (u16Help > 0U)
  {
    return (ON);
  }
  else
  {
    return (OFF);
  }
}

Here is the call graph for this function: