logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ieee1284_set_timeout - modify inactivity timeout

Author

TimWaugh <twaugh@redhat.com> Author.

Description

This function sets a new value for the inactivity timeout (used for block transfer functions), and returns the old value. The port must be claimed. The timeout parameter may be NULL, in which case the old value is left unchanged.

Name

ieee1284_set_timeout - modify inactivity timeout

Notes

Note that this is an inactivity time-out, not an absolute time-out. During a data transfer, if the peripheral is inactive for the length of time specified then the host gives up. It is also advisory; no guarantee is made that the transfer will ever complete.

Return Value

This function returns a pointer to a struct timeval representing the old value. This uses the same storage as the port structure, and so is not valid after closing the port.

Synopsis

#include<ieee1284.h>structtimeval*ieee1284_set_timeout(structparport*port,structtimeval*timeout);

See Also