def set_receive_callback(self, callback):
if not hasattr(callback, '<STR_LIT>'):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>self.receive_callback = callback<EOL>
Sets the receive callback function.

This method has to be called before starting the
HDLC controller.