def enable_reporting(self):
        """Set an input pin to report values."""
        if self.mode is not INPUT:
            raise IOError("{0} is not an input and can therefore not report".format(self))
        if self.type == ANALOG:
            self.reporting = True
            msg = bytearray([REPORT_ANALOG + self.pin_number, 1])
            self.board.sp.write(msg)
        else:
            self.port.enable_reporting()
def enable_reporting ( self ) : if self . mode is not INPUT : raise IOError ( "{0} is not an input and can therefore not report" . format ( self ) ) if self . type == ANALOG : self . reporting = True msg = bytearray ( [ REPORT_ANALOG + self . pin_number , 1 ] ) self . board . sp . write ( msg ) else : self . port . enable_reporting ( )
Set an input pin to report values.