?login_element?

Subversion Repositories NedoOS

Rev

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

  1. /**
  2.   ******************************************************************************
  3.   * @file        OPORA.h
  4.   * @version V1.0.0
  5.   * @date
  6.   * @brief       This file contains all the Special Function Registers definitions
  7.   *              for the Milandr 1986VE1 microcontroller.
  8.   ******************************************************************************
  9.   * @copy
  10.   *
  11.   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  12.   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  13.   * TIME. AS A RESULT, PHYTON SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
  14.   * OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  15.   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  16.   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  17.   *
  18.   * <h2><center>&copy; COPYRIGHT 2010 Phyton</center></h2>
  19.   ******************************************************************************
  20.   * FILE OPORA.h
  21.   */
  22. /* Define to prevent recursive inclusion -------------------------------------*/
  23. #ifndef __OPORA_H
  24. #define __OPORA_H
  25.  
  26. /**
  27.   * @brief 1986VE1 Interrupt Number Definition
  28.   */
  29.  
  30. typedef enum IRQn
  31. {
  32. /******  Cortex-M3 Processor Exceptions Numbers ***************************************************/
  33.   NonMaskableInt_IRQn         = -14,    /*!< 2 Non Maskable Interrupt                             */
  34.   HardFault_IRQn              = -13,    /*!< 3 Cortex-M1 Hard Fault Interrupt                     */
  35.   SVCall_IRQn                 = -5,     /*!< 11 Cortex-M1 SV Call Interrupt                       */
  36.   PendSV_IRQn                 = -2,     /*!< 14 Cortex-M1 Pend SV Interrupt                       */
  37.   SysTick_IRQn                = -1,     /*!< 15 Cortex-M1 System Tick Interrupt                   */
  38.  
  39. /****** MDR32Fx specific Interrupt Numbers *******************************************************/
  40.   MIL_STD_1553B2_IRQn         = 0,      /*!< MIL_STD_1553B2 Interrupt                             */
  41.   MIL_STD_1553B1_IRQn         = 1,      /*!< MIL_STD_1553B1 Interrupt                             */
  42.   USB_IRQn                    = 2,      /*!< USB Host Interrupt                                   */
  43.   CAN1_IRQn                                       = 3,          /*!< CAN1 Interrupt                                                                               */
  44.   CAN2_IRQn                                       = 4,          /*!< CAN2 Interrupt                                                                               */
  45.   DMA_IRQn                    = 5,      /*!< DMA Interrupt                                        */
  46.   UART1_IRQn                  = 6,      /*!< UART1 Interrupt                                      */
  47.   UART2_IRQn                  = 7,      /*!< UART2 Interrupt                                      */
  48.   SSP1_IRQn                   = 8,      /*!< SSP1 Interrupt                                       */
  49.   BUSY_IRQn                                       = 9,          /*!< BUSY Interrupt                                                                               */
  50.   ARINC429R_IRQn              = 10,     /*!< ARINC429 Receiver Interrupt                          */
  51.   POWER_IRQn                  = 11,     /*!< POWER Detecor Interrupt                              */
  52.   WWDG_IRQn                   = 12,     /*!< Window Watchdog Interrupt                            */
  53.   TIMER4_IRQn                             = 13,         /*!< Timer4 Interrupt                                                                     */
  54.   TIMER1_IRQn                 = 14,     /*!< Timer1 Interrupt                                     */
  55.   TIMER2_IRQn                 = 15,     /*!< Timer2 Interrupt                                     */
  56.   TIMER3_IRQn                 = 16,     /*!< Timer3 Interrupt                                     */
  57.   ADC_IRQn                    = 17,     /*!< ADC Interrupt                                        */
  58.   ETHERNET_IRQn               = 18,     /*!< Ethernet Interrupt                                   */
  59.   SSP3_IRQn                               = 19,     /*!< SSP3 Interrupt                                           */
  60.   SSP2_IRQn                   = 20,     /*!< SSP2 Interrupt                                       */
  61.   ARINC429T1_IRQn                         = 21,         /*!< ARINC429 Transmitter 1 Interrupt                                     */
  62.   ARINC429T2_IRQn                         = 22,         /*!< ARINC429 Transmitter 2 Interrupt                                     */
  63.   ARINC429T3_IRQn                         = 23,         /*!< ARINC429 Transmitter 3 Interrupt                                     */
  64.   ARINC429T4_IRQn                         = 24,         /*!< ARINC429 Transmitter 4 Interrupt                                     */
  65.   BKP_IRQn                            = 27,     /*!< BACKUP Interrupt                                     */
  66.   EXT_INT1_IRQn               = 28,     /*!< EXT_INT1 Interrupt                                   */
  67.   EXT_INT2_IRQn               = 29,     /*!< EXT_INT2 Interrupt                                   */
  68.   EXT_INT3_IRQn               = 30,     /*!< EXT_INT3 Interrupt                                   */
  69.   EXT_INT4_IRQn               = 31      /*!< EXT_INT4 Interrupt                                   */
  70. }IRQn_Type;
  71.  
  72. typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
  73.  
  74. typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
  75. #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
  76.  
  77. typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
  78.  
  79. /* Includes ------------------------------------------------------------------*/
  80.  
  81. #include "core_cm1.h"
  82. #include "opora_eeprom_defs.h"
  83. #include "opora_rst_clk_defs.h"
  84. #include "opora_port_defs.h"
  85. #include "opora_bkp_defs.h"
  86. #include "opora_ethernet_defs.h"
  87. #include "opora_ext_bus_cntrl_defs.h"
  88.  
  89. /** @defgroup __Peripheral_Memory_Map Peripheral Memory Map
  90.   * @{
  91.   */
  92.  
  93. #define CAN1_BASE                         0x40000000
  94. #define CAN2_BASE                         0x40008000
  95. #define USB_BASE                          0x40010000
  96. #define EEPROM_BASE               0x40018000
  97. #define RST_CLK_BASE              0x40020000
  98. #define DMA_BASE                          0x40028000
  99. #define UART1_BASE                        0x40030000
  100. #define UART2_BASE                        0x40038000
  101. #define SPI1_BASE                         0x40040000
  102. #define MIL_STD_15531_BASE        0x40048000
  103. #define MIL_STD_15532_BASE        0x40050000
  104. #define POWER_BASE                        0x40058000
  105. #define WWDG_BASE                         0x40060000
  106. #define IWDG_BASE                         0x40068000
  107. #define TIMER1_BASE               0x40070000
  108. #define TIMER2_BASE               0x40078000
  109. #define TIMER3_BASE               0x40080000
  110. #define ADC_BASE                          0x40088000
  111. #define DAC_BASE                          0x40090000
  112. #define TIMER4_BASE               0x40098000
  113. #define SPI2_BASE                         0x400A0000
  114. #define PORTA_BASE                        0x400A8000
  115. #define PORTB_BASE                        0x400B0000
  116. #define PORTC_BASE                        0x400B8000
  117. #define PORTD_BASE                        0x400C0000
  118. #define PORTE_BASE                        0x400C8000
  119. #define ARINC429R_BASE            0x400D0000
  120. #define BKP_BASE                          0x400D8000
  121. #define ARINC429T_BASE            0x400E0000
  122. #define PORTF_BASE                        0x400E8000
  123. #define EXT_BUS_CNTRL_BASE        0x400F0000
  124. #define SPI3_BASE                         0x400F8000
  125. #define ETHERNET_BASE             0x30000000
  126. #define SYS_BASE                          0xE000E000
  127.  
  128. /** @} */ /* End of group __Peripheral_Memory_Map */
  129.  
  130. /** @defgroup __Peripheral_declaration Peripheral declaration
  131.   * @{
  132.   */
  133.  
  134. #define CAN1                              ((CAN_TypeDef                   *)CAN1_BASE             )
  135. #define CAN2                              ((CAN_TypeDef                   *)CAN2_BASE             )
  136. #define USB                               ((USB_TypeDef                   *)USB_BASE              )
  137. #define EEPROM                            ((EEPROM_TypeDef                *)EEPROM_BASE           )
  138. #define RST_CLK                           ((RST_CLK_TypeDef       *)RST_CLK_BASE          )
  139. #define DMA                               ((DMA_TypeDef                   *)DMA_BASE              )
  140. #define UART1                             ((UART_TypeDef                  *)UART1_BASE            )
  141. #define UART2                             ((UART_TypeDef                  *)UART2_BASE            )
  142. #define SPI1                              ((SPI_TypeDef                   *)SPI1_BASE             )
  143. #define MIL_STD_15531             ((MIL_STD_1553_TypeDef  *)MIL_STD_15531_BASE)
  144. #define MIL_STD_15532             ((MIL_STD_1553_TypeDef  *)MIL_STD_15532_BASE)
  145. #define POWER                             ((POWER_TypeDef                 *)POWER_BASE            )
  146. #define WWDG                              ((WWDG_TypeDef                  *)WWDG_BASE             )
  147. #define IWDG                              ((IWDG_TypeDef                  *)IWDG_BASE             )
  148. #define TIMER1                            ((TIMER_TypeDef                 *)TIMER1_BASE           )
  149. #define TIMER2                            ((TIMER_TypeDef                 *)TIMER2_BASE           )
  150. #define TIMER3                            ((TIMER_TypeDef                 *)TIMER3_BASE           )
  151. #define ADC                               ((ADC_TypeDef                   *)ADC_BASE              )
  152. #define DAC                               ((DAC_TypeDef                   *)DAC_BASE              )
  153. #define TIMER4                            ((TIMER_TypeDef                 *)TIMER4_BASE           )
  154. #define SPI2                              ((SPI_TypeDef                   *)SPI2_BASE             )
  155. #define PORTA                             ((PORT_TypeDef                  *)PORTA_BASE            )
  156. #define PORTB                             ((PORT_TypeDef                  *)PORTB_BASE            )
  157. #define PORTC                             ((PORT_TypeDef                  *)PORTC_BASE            )
  158. #define PORTD                             ((PORT_TypeDef                  *)PORTD_BASE            )
  159. #define PORTE                             ((PORT_TypeDef                  *)PORTE_BASE            )
  160. #define ARINC429R                         ((ARINC429R_TypeDef     *)ARINC429R_BASE        )
  161. #define BKP                               ((BKP_TypeDef                   *)BKP_BASE              )
  162. #define ARINC429T                         ((ARINC429T_TypeDef     *)ARINC429T_BASE        )
  163. #define PORTF                             ((PORT_TypeDef                  *)PORTF_BASE            )
  164. #define EXT_BUS_CNTRL             ((EXT_BUS_CNTRL_TypeDef *)EXT_BUS_CNTRL_BASE)
  165. #define SPI3                              ((SPI_TypeDef                   *)SPI3_BASE             )
  166. #define ETHERNET                          ((ETHERNET_TypeDef      *)ETHERNET_BASE         )
  167. #define SYS                               ((SYS_TypeDef                   *)SYS_BASE              )
  168.  
  169. /** @} */ /* End of group __Peripheral_declaration */
  170.  
  171.  
  172. #endif /* __OPORA_H */
  173.  
  174. /******************* (C) COPYRIGHT 2010 Phyton *********************************
  175. *
  176. * END OF FILE OPORA.h */
  177.  
  178.