ibsre.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /***************************************************************************
  2. ibsre.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. #include <linux/delay.h>
  17. /*
  18. * IBSRE
  19. * Send REN true if v is non-zero or false if v is zero.
  20. */
  21. int ibsre( gpib_board_t *board, int enable )
  22. {
  23. if( board->master == 0 )
  24. {
  25. printk( "gpib: tried to set REN when not system controller\n" );
  26. return -1;
  27. }
  28. board->interface->remote_enable( board, enable ); /* set or clear REN */
  29. if( !enable )
  30. udelay(100);
  31. return 0;
  32. }