la unica funcion que conozco llamada input_state() es una del compilador CCS, como podes ver es importante conocer que compilador estas usando.
Si buscas el manual del compilador dice lo siguiente:
input_state( )
Syntax: value = input_state(pin)
Parameters: pin to read. Pins are defined in the devices .h file. The actual value is a bit address. For example, port a (byte 5 ) bit 3 would have a value of 5*8+3 or 43 . This is defined as follows: #define
PIN_A3 43 .
Returns: Bit specifying whether pin is high or low. A 1 indicates the pin is high and a 0 indicates it is low.
Function: This function reads the level of a pin without changing the direction of the pin as INPUT() does.
Availability: All devices.
Requires: Nothing
Examples:
level = input_state(pin_A3);
Example Files: None
Lo importante:
This function reads the level of a pin without changing the direction of the pin as INPUT() does.
Esta funcion lee el nivel del pin, SIN CAMBIARLE LA DIRECCION, ya que por defecto si usas input, le cambia la direccion.