OSCheckSilentLink Function (ROM Call 0x24A)

link.h

short OSCheckSilentLink (void);

Checks the link state.

OSCheckSilentLink returns an integer which determines the link state. The meaning of the returned value is:

0None (the link is silent)
1A variable header or extended header is received
2A direct command, a screen dump, a request with size or a request is in progress
3The link is ready

This function is called from high-level keyboard reading functions like kbhit and ngetchx, and if it returns non-zero, OSLinkCmd is called to process the received packet (as the link is interrupt-driven, a packet may be received asynchronously, without the request from the program itself). So, the TIOS can receive variables from the link whenever the program is waiting for a keypress (used mainly when the calculator is in the Home Screen).


Uses: LIO_RecvData, OSLinkClose, OSLinkReset
Used by: kbhit, ngetchx