TWD/TWDriver/TWDriverRate.h
changeset 0 10c42ec6c05f
equal deleted inserted replaced
-1:000000000000 0:10c42ec6c05f
       
     1 /*
       
     2  * TWDriverRate.h
       
     3  *
       
     4  * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
       
     5  * All rights reserved.      
       
     6  * 
       
     7  * This program and the accompanying materials are made available under the 
       
     8  * terms of the Eclipse Public License v1.0 or BSD License which accompanies
       
     9  * this distribution. The Eclipse Public License is available at
       
    10  * http://www.eclipse.org/legal/epl-v10.html and the BSD License is as below.                                   
       
    11  *                                                                       
       
    12  * Redistribution and use in source and binary forms, with or without    
       
    13  * modification, are permitted provided that the following conditions    
       
    14  * are met:                                                              
       
    15  *                                                                       
       
    16  *  * Redistributions of source code must retain the above copyright     
       
    17  *    notice, this list of conditions and the following disclaimer.      
       
    18  *  * Redistributions in binary form must reproduce the above copyright  
       
    19  *    notice, this list of conditions and the following disclaimer in    
       
    20  *    the documentation and/or other materials provided with the         
       
    21  *    distribution.                                                      
       
    22  *  * Neither the name Texas Instruments nor the names of its            
       
    23  *    contributors may be used to endorse or promote products derived    
       
    24  *    from this software without specific prior written permission.      
       
    25  *                                                                       
       
    26  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
       
    27  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
       
    28  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
       
    29  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
       
    30  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
       
    31  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
       
    32  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
       
    33  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
       
    34  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
       
    35  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
       
    36  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
    37  */
       
    38 
       
    39 #ifndef TWDRIVERRATE_H
       
    40 #define TWDRIVERRATE_H
       
    41 
       
    42 /** \file  TWDriverRate.h 
       
    43  *  \brief TWDriver Rate APIs
       
    44  *
       
    45  *  \see
       
    46  */
       
    47 
       
    48 /** \enum ERate
       
    49  * \brief Rate Types
       
    50  * 
       
    51  * \par Description
       
    52  * Driver's TX Control Frame Rate Format Type
       
    53  * 
       
    54  * \sa
       
    55  */
       
    56 typedef enum
       
    57 {
       
    58     DRV_RATE_AUTO       = 0,				/**< Auto							*/
       
    59     DRV_RATE_1M         = 1,				/**< 1M								*/
       
    60     DRV_RATE_2M         = 2,				/**< 2M								*/
       
    61     DRV_RATE_5_5M       = 3,				/**< 5.5M							*/
       
    62     DRV_RATE_11M        = 4,				/**< 11M							*/
       
    63     DRV_RATE_22M        = 5,				/**< 22M							*/
       
    64     DRV_RATE_6M         = 6,				/**< 6M								*/
       
    65     DRV_RATE_9M         = 7,				/**< 9M								*/	
       
    66     DRV_RATE_12M        = 8,				/**< 12M							*/	
       
    67     DRV_RATE_18M        = 9,				/**< 18M							*/
       
    68     DRV_RATE_24M        = 10,				/**< 24M							*/
       
    69     DRV_RATE_36M        = 11,				/**< 36M							*/
       
    70     DRV_RATE_48M        = 12,				/**< 48M							*/
       
    71     DRV_RATE_54M        = 13,				/**< 54M							*/
       
    72     DRV_RATE_MCS_0      = 14,				/**< 6.5M or  7.2					*/ 	
       
    73     DRV_RATE_MCS_1      = 15,				/**< 13.0M or 14.4					*/
       
    74     DRV_RATE_MCS_2      = 16,				/**< 19.5M or 21.7 					*/
       
    75     DRV_RATE_MCS_3      = 17,				/**< 26.0M or 28.9 					*/
       
    76     DRV_RATE_MCS_4      = 18,				/**< 39.0M or 43.3 					*/
       
    77     DRV_RATE_MCS_5      = 19,				/**< 52.0M or 57.8 					*/
       
    78     DRV_RATE_MCS_6      = 20,				/**< 58.5M or 65.0 					*/
       
    79     DRV_RATE_MCS_7      = 21,				/**< 65.0M or 72.2 					*/
       
    80     DRV_RATE_MAX        = DRV_RATE_MCS_7,	/**< Maximum Driver's Rate Type 	*/
       
    81     DRV_RATE_INVALID    = 0xFF				/**< Invalid Driver's Rate Type 	*/
       
    82 
       
    83 } ERate;
       
    84 
       
    85 #define RATE_TO_MASK(R)  (1 << ((R) - 1))
       
    86 
       
    87 /** \enum ERateMask
       
    88  * \brief Driver rate mask
       
    89  * 
       
    90  * \par Description
       
    91  * 
       
    92  * \sa
       
    93  */
       
    94 typedef enum
       
    95 {
       
    96     DRV_RATE_MASK_AUTO          = DRV_RATE_AUTO,                  /**< 0x000000	*/
       
    97     DRV_RATE_MASK_1_BARKER      = RATE_TO_MASK(DRV_RATE_1M),      /**< 0x000001	*/
       
    98     DRV_RATE_MASK_2_BARKER      = RATE_TO_MASK(DRV_RATE_2M),      /**< 0x000002	*/
       
    99     DRV_RATE_MASK_5_5_CCK       = RATE_TO_MASK(DRV_RATE_5_5M),    /**< 0x000004	*/
       
   100     DRV_RATE_MASK_11_CCK        = RATE_TO_MASK(DRV_RATE_11M),     /**< 0x000008	*/
       
   101     DRV_RATE_MASK_22_PBCC       = RATE_TO_MASK(DRV_RATE_22M),     /**< 0x000010	*/
       
   102     DRV_RATE_MASK_6_OFDM        = RATE_TO_MASK(DRV_RATE_6M),      /**< 0x000020	*/
       
   103     DRV_RATE_MASK_9_OFDM        = RATE_TO_MASK(DRV_RATE_9M),      /**< 0x000040	*/
       
   104     DRV_RATE_MASK_12_OFDM       = RATE_TO_MASK(DRV_RATE_12M),     /**< 0x000080	*/
       
   105     DRV_RATE_MASK_18_OFDM       = RATE_TO_MASK(DRV_RATE_18M),     /**< 0x000100	*/
       
   106     DRV_RATE_MASK_24_OFDM       = RATE_TO_MASK(DRV_RATE_24M),     /**< 0x000200	*/
       
   107     DRV_RATE_MASK_36_OFDM       = RATE_TO_MASK(DRV_RATE_36M),     /**< 0x000400	*/
       
   108     DRV_RATE_MASK_48_OFDM       = RATE_TO_MASK(DRV_RATE_48M),     /**< 0x000800	*/
       
   109     DRV_RATE_MASK_54_OFDM       = RATE_TO_MASK(DRV_RATE_54M),     /**< 0x001000	*/
       
   110     DRV_RATE_MASK_MCS_0_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_0),   /**< 0x002000	*/
       
   111     DRV_RATE_MASK_MCS_1_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_1),   /**< 0x004000	*/
       
   112     DRV_RATE_MASK_MCS_2_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_2),   /**< 0x008000	*/
       
   113     DRV_RATE_MASK_MCS_3_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_3),   /**< 0x010000	*/
       
   114     DRV_RATE_MASK_MCS_4_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_4),   /**< 0x020000	*/
       
   115     DRV_RATE_MASK_MCS_5_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_5),   /**< 0x040000	*/
       
   116     DRV_RATE_MASK_MCS_6_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_6),   /**< 0x080000	*/
       
   117     DRV_RATE_MASK_MCS_7_OFDM    = RATE_TO_MASK(DRV_RATE_MCS_7)    /**< 0x100000	*/
       
   118 
       
   119 } ERateMask;
       
   120 
       
   121 #define PBCC_BIT        0x00000080 /* BIT_7 */
       
   122 
       
   123 #endif /* #define TWDRIVERRATE_H */