?login_element?

Subversion Repositories NedoOS

Rev

Rev 8 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /**
  2.   ******************************************************************************
  3.   * @file    opora_port_defs.h
  4.   * @author  Phyton Application Team
  5.   * @version V1.0.0
  6.   * @date
  7.   * @brief   This file contains all the Special Function Registers definitions
  8.   *          for the PORT peripheral unit used in the Milandr OPORA
  9.   *          microcontrollers.
  10.   ******************************************************************************
  11.   * @copy
  12.   *
  13.   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  14.   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  15.   * TIME. AS A RESULT, PHYTON SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
  16.   * OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  17.   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  18.   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  19.   *
  20.   * <h2><center>&copy; COPYRIGHT 2010 Phyton</center></h2>
  21.   ******************************************************************************
  22.   * FILE opora_port_defs.h
  23.   */
  24.  
  25. /* Define to prevent recursive inclusion -------------------------------------*/
  26. #ifndef __OPORA_PORT_DEFS_H
  27. #define __OPORA_PORT_DEFS_H
  28.  
  29. /** @addtogroup __CMSIS CMSIS
  30.   * @{
  31.   */
  32.  
  33. /** @addtogroup __OPORA_Peripheral_Units OPORA Peripheral Units
  34.   * @{
  35.   */
  36.  
  37. /** @defgroup Periph_PORT PORT
  38.   * @{
  39.   */
  40.  
  41. /** @defgroup Periph_PORT_Data_Structures Data Structures
  42.   * @{
  43.   */
  44.  
  45. /** @defgroup Periph_PORT_TypeDef PORT_TypeDef
  46.   * @{
  47.   */
  48.  
  49. typedef struct {
  50.   __IO uint32_t RXTX;
  51.   __IO uint32_t OE;
  52.   __IO uint32_t FUNC;
  53.   __IO uint32_t ANALOG;
  54.   __IO uint32_t PULL;
  55.   __IO uint32_t PD;
  56.   __IO uint32_t PWR;
  57.   __IO uint32_t GFEN;
  58.   __IO uint32_t SETTX;
  59.   __IO uint32_t CLRTX;
  60.   __IO uint32_t RDTX;
  61. } PORT_TypeDef;
  62.  
  63. /** @} */ /* End of group Periph_PORT_TypeDef */
  64.  
  65. /** @} */ /* End of group Periph_PORT_Data_Structures */
  66.  
  67. /** @defgroup Periph_PORT_Defines Defines
  68.   * @{
  69.   */
  70.  
  71. /** @defgroup Periph_PORT_PORT_FUNC_Bits PORT_FUNC
  72.   * @{
  73.   */
  74.  
  75. #define PORT_FUNC_MODE0_OFFS                    0
  76. #define PORT_FUNC_MODE0_MASK                    ((uint32_t)0x00000003)
  77.  
  78. #define PORT_FUNC_MODE1_OFFS                    2
  79. #define PORT_FUNC_MODE1_MASK                    ((uint32_t)0x0000000C)
  80.  
  81. #define PORT_FUNC_MODE2_OFFS                    4
  82. #define PORT_FUNC_MODE2_MASK                    ((uint32_t)0x00000030)
  83.  
  84. #define PORT_FUNC_MODE3_OFFS                    6
  85. #define PORT_FUNC_MODE3_MASK                    ((uint32_t)0x000000C0)
  86.  
  87. #define PORT_FUNC_MODE4_OFFS                    8
  88. #define PORT_FUNC_MODE4_MASK                    ((uint32_t)0x00000300)
  89.  
  90. #define PORT_FUNC_MODE5_OFFS                    10
  91. #define PORT_FUNC_MODE5_MASK                    ((uint32_t)0x00000C00)
  92.  
  93. #define PORT_FUNC_MODE6_OFFS                    12
  94. #define PORT_FUNC_MODE6_MASK                    ((uint32_t)0x00003000)
  95.  
  96. #define PORT_FUNC_MODE7_OFFS                    14
  97. #define PORT_FUNC_MODE7_MASK                    ((uint32_t)0x0000C000)
  98.  
  99. #define PORT_FUNC_MODE8_OFFS                    16
  100. #define PORT_FUNC_MODE8_MASK                    ((uint32_t)0x00030000)
  101.  
  102. #define PORT_FUNC_MODE9_OFFS                    18
  103. #define PORT_FUNC_MODE9_MASK                    ((uint32_t)0x000C0000)
  104.  
  105. #define PORT_FUNC_MODE10_OFFS                   20
  106. #define PORT_FUNC_MODE10_MASK                   ((uint32_t)0x00300000)
  107.  
  108. #define PORT_FUNC_MODE11_OFFS                   22
  109. #define PORT_FUNC_MODE11_MASK                   ((uint32_t)0x00C00000)
  110.  
  111. #define PORT_FUNC_MODE12_OFFS                   24
  112. #define PORT_FUNC_MODE12_MASK                   ((uint32_t)0x03000000)
  113.  
  114. #define PORT_FUNC_MODE13_OFFS                   26
  115. #define PORT_FUNC_MODE13_MASK                   ((uint32_t)0x0C000000)
  116.  
  117. #define PORT_FUNC_MODE14_OFFS                   28
  118. #define PORT_FUNC_MODE14_MASK                   ((uint32_t)0x30000000)
  119.  
  120. #define PORT_FUNC_MODE15_OFFS                   30
  121. #define PORT_FUNC_MODE15_MASK                   ((uint32_t)0xC0000000)
  122.  
  123.  
  124. /** @} */ /* End of group Periph_PORT_PORT_FUNC_Bits */
  125.  
  126. /** @} */ /* End of group Periph_PORT_Defines */
  127.  
  128. /** @defgroup Periph_PORT_Defines Defines
  129.   * @{
  130.   */
  131.  
  132. /** @defgroup Periph_PORT_PORT_PWR_Bits PORT_PWR
  133.   * @{
  134.   */
  135.  
  136. #define PORT_PWR_PWR0_OFFS                      0
  137. #define PORT_PWR_PWR0_MASK                      ((uint32_t)0x00000003)
  138.  
  139. #define PORT_PWR_PWR1_OFFS                      2
  140. #define PORT_PWR_PWR1_MASK                      ((uint32_t)0x0000000C)
  141.  
  142. #define PORT_PWR_PWR2_OFFS                      4
  143. #define PORT_PWR_PWR2_MASK                      ((uint32_t)0x00000030)
  144.  
  145. #define PORT_PWR_PWR3_OFFS                      6
  146. #define PORT_PWR_PWR3_MASK                      ((uint32_t)0x000000C0)
  147.  
  148. #define PORT_PWR_PWR4_OFFS                      8
  149. #define PORT_PWR_PWR4_MASK                      ((uint32_t)0x00000300)
  150.  
  151. #define PORT_PWR_PWR5_OFFS                      10
  152. #define PORT_PWR_PWR5_MASK                      ((uint32_t)0x00000C00)
  153.  
  154. #define PORT_PWR_PWR6_OFFS                      12
  155. #define PORT_PWR_PWR6_MASK                      ((uint32_t)0x00003000)
  156.  
  157. #define PORT_PWR_PWR7_OFFS                      14
  158. #define PORT_PWR_PWR7_MASK                      ((uint32_t)0x0000C000)
  159.  
  160. #define PORT_PWR_PWR8_OFFS                      16
  161. #define PORT_PWR_PWR8_MASK                      ((uint32_t)0x00030000)
  162.  
  163. #define PORT_PWR_PWR9_OFFS                      18
  164. #define PORT_PWR_PWR9_MASK                      ((uint32_t)0x000C0000)
  165.  
  166. #define PORT_PWR_PWR10_OFFS                     20
  167. #define PORT_PWR_PWR10_MASK                     ((uint32_t)0x00300000)
  168.  
  169. #define PORT_PWR_PWR11_OFFS                     22
  170. #define PORT_PWR_PWR11_MASK                     ((uint32_t)0x00C00000)
  171.  
  172. #define PORT_PWR_PWR12_OFFS                     24
  173. #define PORT_PWR_PWR12_MASK                     ((uint32_t)0x03000000)
  174.  
  175. #define PORT_PWR_PWR13_OFFS                     26
  176. #define PORT_PWR_PWR13_MASK                     ((uint32_t)0x0C000000)
  177.  
  178. #define PORT_PWR_PWR14_OFFS                     28
  179. #define PORT_PWR_PWR14_MASK                     ((uint32_t)0x30000000)
  180.  
  181. #define PORT_PWR_PWR15_OFFS                     30
  182. #define PORT_PWR_PWR15_MASK                     ((uint32_t)0xC0000000)
  183.  
  184.  
  185. /** @} */ /* End of group Periph_PORT_PORT_PWR_Bits */
  186.  
  187. /** @} */ /* End of group Periph_PORT_Defines */
  188.  
  189. /** @} */ /* End of group Periph_PORT */
  190.  
  191. /** @} */ /* End of group __OPORA_Peripheral_Units */
  192.  
  193. /** @} */ /* End of group __CMSIS */
  194.  
  195. #endif /* __OPORA_PORT_DEFS_H */
  196.  
  197. /******************* (C) COPYRIGHT 2010 Phyton *********************************
  198. *
  199. * END OF FILE opora_port_defs.h */
  200.