iblines.c 518 B

1234567891011121314151617181920212223242526
  1. #include "gpibP.h"
  2. /*
  3. * IBLINES
  4. * Poll the GPIB control lines and return their status in buf.
  5. *
  6. * LSB (bits 0-7) - VALID lines mask (lines that can be monitored).
  7. * Next LSB (bits 8-15) - STATUS lines mask (lines that are currently set).
  8. *
  9. */
  10. int iblines( const gpib_board_t *board, short *lines)
  11. {
  12. int retval;
  13. *lines = 0;
  14. if( board->interface->line_status == NULL )
  15. {
  16. return 0;
  17. }
  18. retval = board->interface->line_status( board );
  19. if(retval < 0) return retval;
  20. *lines = retval;
  21. return 0;
  22. }