ibgts.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /***************************************************************************
  2. sys/ibgts.c
  3. -------------------
  4. copyright : (C) 2001, 2002 by Frank Mori Hess
  5. email : fmhess@users.sourceforge.net
  6. ***************************************************************************/
  7. /***************************************************************************
  8. * *
  9. * This program is free software; you can redistribute it and/or modify *
  10. * it under the terms of the GNU General Public License as published by *
  11. * the Free Software Foundation; either version 2 of the License, or *
  12. * (at your option) any later version. *
  13. * *
  14. ***************************************************************************/
  15. #include "gpibP.h"
  16. /*
  17. * IBGTS
  18. * Go to the controller standby state from the controller
  19. * active state, i.e., turn ATN off.
  20. */
  21. int ibgts( gpib_board_t *board )
  22. {
  23. int status = ibstatus( board );
  24. int retval;
  25. if( ( status & CIC ) == 0 )
  26. {
  27. printk( "gpib: not CIC during ibgts()\n" );
  28. return -1;
  29. }
  30. retval = board->interface->go_to_standby( board ); /* go to standby */
  31. if( retval < 0 )
  32. printk( "gpib: error while going to standby\n");
  33. board->interface->update_status( board, 0 );
  34. return retval;
  35. }