Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
arm_cm0.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Freescale Semiconductor Inc.
4 * (c) Copyright 2013 Freescale Semiconductor, Inc.
5 * ALL RIGHTS RESERVED.
6 *
7 ***************************************************************************
8 *
9 * THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESSED OR
10 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
11 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
12 * IN NO EVENT SHALL FREESCALE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
13 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
14 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
15 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
18 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
19 * THE POSSIBILITY OF SUCH DAMAGE.
20 *
21 ***************************************************************************/
35 #ifndef _CPU_ARM_CM0_H
36 #define _CPU_ARM_CM0_H
37 
39 // Definitions
41 
43 #define ARM_INTERRUPT_LEVEL_BITS 2
44 
46 #if defined __CC_ARM
47 #define EnableInterrupts __enable_irq()
48 #else
49 #define EnableInterrupts asm(" CPSIE i");
50 #endif
51 
53 #if defined __CC_ARM
54 #define DisableInterrupts __disable_irq()
55 #else
56 #define DisableInterrupts asm(" CPSID i");
57 #endif
58 
59 #define disable_irq(irq) NVIC_DisableIRQ(irq)
60 #define enable_irq(irq) NVIC_EnableIRQ(irq)
61 #define set_irq_priority(irq, prio) NVIC_SetPriority(irq, prio)
62 
64 #ifdef FALSE
65 #undef FALSE
66 #endif
67 #define FALSE (0)
68 
69 #ifdef TRUE
70 #undef TRUE
71 #endif
72 #define TRUE (1)
73 
74 #ifdef NULL
75 #undef NULL
76 #endif
77 #define NULL (0)
78 
79 #ifdef ON
80 #undef ON
81 #endif
82 #define ON (1)
83 
84 #ifdef OFF
85 #undef OFF
86 #endif
87 #define OFF (0)
88 
89 #undef ENABLE
90 #define ENABLE (1)
91 
92 #undef DISABLE
93 #define DISABLE (0)
94 
96 typedef unsigned char uint8;
97 typedef unsigned short int uint16;
98 typedef unsigned long int uint32;
99 
100 typedef char int8;
101 typedef short int int16;
102 typedef int int32;
103 
104 typedef volatile int8 vint8;
105 typedef volatile int16 vint16;
106 typedef volatile int32 vint32;
107 
108 typedef volatile uint8 vuint8;
109 typedef volatile uint16 vuint16;
110 typedef volatile uint32 vuint32;
111 
113 // Prototypes
115 
119 int main(void);
120 
124 void stop (void);
125 void wait (void);
126 void write_vtor (int);
127 
128 #endif /* _CPU_ARM_CM4_H */
129 
131 // EOF
133 
void write_vtor(int)
void wait(void)
short int int16
16 bits
Definition: arm_cm0.h:101
volatile int16 vint16
16 bits
Definition: arm_cm0.h:105
volatile int32 vint32
32 bits
Definition: arm_cm0.h:106
volatile uint32 vuint32
32 bits
Definition: arm_cm0.h:110
volatile int8 vint8
8 bits
Definition: arm_cm0.h:104
int main(void)
Main demo function.
Definition: demo_apps/adc_hw_trigger/main.c:211
volatile uint16 vuint16
16 bits
Definition: arm_cm0.h:109
int int32
32 bits
Definition: arm_cm0.h:102
char int8
8 bits
Definition: arm_cm0.h:100
unsigned char uint8
The basic data types.
Definition: arm_cm0.h:96
void stop(void)
Function prototype for arm_cm0.c.
unsigned short int uint16
16 bits
Definition: arm_cm0.h:97
unsigned long int uint32
32 bits
Definition: arm_cm0.h:98
volatile uint8 vuint8
8 bits
Definition: arm_cm0.h:108