# LANGUAGE CPP , NoImplicitPrelude #

#if __GLASGOW_HASKELL__ >= 704
# LANGUAGE Trustworthy #
#endif

--------------------------------------------------------------------------------
-- |
-- Module      :  System.USB.IO
  Copyright    :   ( c ) 2009–2017   
-- License     :  BSD3 (see the file LICENSE)
  Maintainer   :      <  >
--
-- This module provides functions for performing /control/, /bulk/ and
-- /interrupt/ transfers.
--
  When your system supports the GHC ' EventManager ' this module additionally
-- exports functions for performing /isochronous/ transfers. These are currently
  not available on Windows .
--
-- /WARNING:/ You need to enable the threaded runtime (@-threaded@) when using
-- the isochronous functions. They throw a runtime error otherwise!
--
--------------------------------------------------------------------------------

module System.USB.IO
    (
  * One - off transfers
      ReadAction,  ReadExactAction
    , WriteAction, WriteExactAction
    , Size
    , Timeout, noTimeout
    , Status(..)

      -- ** Control transfers
    , ControlSetup(..)
    , RequestType(..)
    , Recipient(..)
    , Request
    , Value
    , Index

    , control
    , readControl,  readControlExact
    , writeControl, writeControlExact

      -- ** Bulk transfers
    , readBulk
    , writeBulk

      -- ** Interrupt transfers
    , readInterrupt
    , writeInterrupt

#ifdef HAS_EVENT_MANAGER
      -- ** Isochronous transfers
      -- | /WARNING:/ You need to enable the threaded runtime (@-threaded@) when using
      -- the isochronous functions. They throw a runtime error otherwise!
    , readIsochronous
    , writeIsochronous
#endif
    ) where

#ifdef __HADDOCK_VERSION__
#ifdef HAS_EVENT_MANAGER
#if MIN_VERSION_base(4,4,0)
import GHC.Event
#else
import System.Event
#endif
  ( EventManager )
#endif
#endif

import System.USB.Base

------------------------------------------------------------------------------
 |
 Module      :  System.USB.IO
 License     :  BSD3 (see the file LICENSE)

 This module provides functions for performing /control/, /bulk/ and
 /interrupt/ transfers.

 exports functions for performing /isochronous/ transfers. These are currently

 /WARNING:/ You need to enable the threaded runtime (@-threaded@) when using
 the isochronous functions. They throw a runtime error otherwise!

------------------------------------------------------------------------------
 ** Control transfers
 ** Bulk transfers
 ** Interrupt transfers
 ** Isochronous transfers
 | /WARNING:/ You need to enable the threaded runtime (@-threaded@) when using
 the isochronous functions. They throw a runtime error otherwise!
# LANGUAGE CPP , NoImplicitPrelude #

#if __GLASGOW_HASKELL__ >= 704
# LANGUAGE Trustworthy #
#endif

  Copyright    :   ( c ) 2009–2017   
  Maintainer   :      <  >
  When your system supports the GHC ' EventManager ' this module additionally
  not available on Windows .

module System.USB.IO
    (
  * One - off transfers
      ReadAction,  ReadExactAction
    , WriteAction, WriteExactAction
    , Size
    , Timeout, noTimeout
    , Status(..)

    , ControlSetup(..)
    , RequestType(..)
    , Recipient(..)
    , Request
    , Value
    , Index

    , control
    , readControl,  readControlExact
    , writeControl, writeControlExact

    , readBulk
    , writeBulk

    , readInterrupt
    , writeInterrupt

#ifdef HAS_EVENT_MANAGER
    , readIsochronous
    , writeIsochronous
#endif
    ) where

#ifdef __HADDOCK_VERSION__
#ifdef HAS_EVENT_MANAGER
#if MIN_VERSION_base(4,4,0)
import GHC.Event
#else
import System.Event
#endif
  ( EventManager )
#endif
#endif

import System.USB.Base
