{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE Trustworthy #-} #endif -------------------------------------------------------------------------------- -- | -- Module : System.USB.Descriptors -- Copyright : (c) 2009–2012 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk -- -- USB devices report their attributes using descriptors. A descriptor is a data -- structure with a defined format. Using descriptors allows concise storage of -- the attributes of individual configurations because each configuration may -- reuse descriptors or portions of descriptors from other configurations that -- have the same characteristics. In this manner, the descriptors resemble -- individual data records in a relational database. -- -- Where appropriate, descriptors contain references to string descriptors -- ('StrIx') that provide textual information describing a descriptor in -- human-readable form. Note that the inclusion of string descriptors is -- optional. -- -------------------------------------------------------------------------------- module System.USB.Descriptors ( -- * Device descriptor getDeviceDesc , DeviceDesc(..) , ReleaseNumber -- | For a database of USB vendors and products see the @usb-id-database@ -- package at: , VendorId, ProductId -- * Configuration descriptor , getConfigDesc , ConfigDesc(..) -- *** Configuration attributes , ConfigAttribs , DeviceStatus(..) -- * Interface descriptor , Interface , InterfaceDesc(..) -- * Endpoint descriptor , EndpointDesc(..) -- *** Endpoint address , EndpointAddress(..) , TransferDirection(..) -- *** Endpoint attributes , EndpointAttribs , TransferType(..) -- **** Isochronous transfer attributes , Synchronization(..) , Usage(..) -- *** Endpoint max packet size , MaxPacketSize(..) , TransactionOpportunities(..) , maxIsoPacketSize -- * String descriptors , getLanguages , LangId, PrimaryLangId, SubLangId , StrIx , getStrDesc , getStrDescFirstLang ) where import System.USB.Base