Robobo
ARMCM4.h
Go to the documentation of this file.
1 /**************************************************************************/
26 #ifndef ARMCM4_H
27 #define ARMCM4_H
28 
29 /*
30  * ==========================================================================
31  * ---------- Interrupt Number Definition -----------------------------------
32  * ==========================================================================
33  */
34 
35 typedef enum IRQn
36 {
37 /****** Cortex-M4 Processor Exceptions Numbers ***************************************************/
41  BusFault_IRQn = -11,
43  SVCall_IRQn = -5,
45  PendSV_IRQn = -2,
46  SysTick_IRQn = -1,
48 /****** ARMCM4 specific Interrupt Numbers ********************************************************/
49  GPIO_IRQn = 0
50 } IRQn_Type;
51 
52 
53 /*
54  * ==========================================================================
55  * ----------- Processor and Core Peripheral Section ------------------------
56  * ==========================================================================
57  */
58 
59 /* Configuration of the Cortex-M4 Processor and Core Peripherals */
60 #define __CM4_REV 0x0001
61 #define __MPU_PRESENT 1
62 #define __NVIC_PRIO_BITS 3
63 #define __Vendor_SysTickConfig 0
64 #define __FPU_PRESENT 1
67 #include <core_cm4.h> /* Cortex-M4 processor and core peripherals */
68 #include "system_ARMCM4.h" /* System Header */
69 
70 
71 /******************************************************************************/
72 /* Device Specific Peripheral registers structures */
73 /******************************************************************************/
74 
75 /*--------------------- General Purpose Input and Ouptut ---------------------*/
76 typedef union
77 {
78  __IO uint32_t WORD;
79  __IO uint8_t BYTE[4];
81 
82 typedef struct
83 {
84  GPIO_Data_TypeDef DATA [256];
85  __O uint32_t DIR;
86  uint32_t RESERVED[3];
87  __O uint32_t IE;
89 
90 
91 /******************************************************************************/
92 /* Peripheral memory map */
93 /******************************************************************************/
94 /* Peripheral and SRAM base address */
95 #define ARM_SRAM_BASE (( uint32_t)0x20000000UL)
96 #define ARM_PERIPH_BASE (( uint32_t)0x40000000UL)
97 
98 /* Peripheral memory map */
99 #define ARM_GPIO_BASE ARM_PERIPH_BASE
100 
101 #define ARM_GPIO0_BASE (ARM_GPIO_BASE)
102 #define ARM_GPIO1_BASE (ARM_GPIO_BASE + 0x0800UL)
103 #define ARM_GPIO2_BASE (ARM_GPIO_BASE + 0x1000UL)
104 
105 
106 /******************************************************************************/
107 /* Peripheral declaration */
108 /******************************************************************************/
109 #define ARM_GPIO0 ((ARM_GPIO_TypeDef *) ARM_GPIO0_BASE)
110 #define ARM_GPIO1 ((ARM_GPIO_TypeDef *) ARM_GPIO1_BASE)
111 #define ARM_GPIO2 ((ARM_GPIO_TypeDef *) ARM_GPIO2_BASE)
112 
113 
114 #endif /* ARMCM4_H */
Definition: ARMCM4.h:43
Definition: ARMCM4.h:44
Definition: ARMCM0.h:75
IRQn
Definition: ARMCM0.h:35
Definition: ARMCM4.h:46
Definition: ARMCM4.h:42
Definition: ARMCM0.h:81
CMSIS Cortex-M4 Device System Header File for CM4 Device Series.
#define __IO
Definition: core_cm0.h:157
#define __O
Definition: core_cm0.h:156
Definition: ARMCM4.h:41
Definition: ARMCM4.h:38
Definition: ARMCM4.h:45
Definition: ARMCM4.h:40
Definition: ARMCM4.h:39
Definition: ARMCM4.h:49