Subversion Repositories DashDisplay

Rev

Rev 49 | Rev 61 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 49 Rev 50
Line -... Line 1...
-
 
1
/* USER CODE BEGIN Header */
1
/**
2
/**
2
  ******************************************************************************
3
  ******************************************************************************
3
  * @file    stm32l1xx_it.c
4
  * @file    stm32l1xx_it.c
4
  * @brief   Interrupt Service Routines.
5
  * @brief   Interrupt Service Routines.
5
  ******************************************************************************
6
  ******************************************************************************
-
 
7
  * @attention
6
  *
8
  *
7
  * COPYRIGHT(c) 2018 STMicroelectronics
9
  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
-
 
10
  * All rights reserved.</center></h2>
8
  *
11
  *
9
  * Redistribution and use in source and binary forms, with or without modification,
12
  * This software component is licensed by ST under BSD 3-Clause license,
10
  * are permitted provided that the following conditions are met:
13
  * the "License"; You may not use this file except in compliance with the
11
  *   1. Redistributions of source code must retain the above copyright notice,
-
 
12
  *      this list of conditions and the following disclaimer.
-
 
13
  *   2. Redistributions in binary form must reproduce the above copyright notice,
-
 
14
  *      this list of conditions and the following disclaimer in the documentation
-
 
15
  *      and/or other materials provided with the distribution.
14
  * License. You may obtain a copy of the License at:
16
  *   3. Neither the name of STMicroelectronics nor the names of its contributors
-
 
17
  *      may be used to endorse or promote products derived from this software
15
  *                        opensource.org/licenses/BSD-3-Clause
18
  *      without specific prior written permission.
-
 
19
  *
-
 
20
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-
 
21
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-
 
22
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-
 
23
  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-
 
24
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-
 
25
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-
 
26
  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-
 
27
  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-
 
28
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
 
29
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
30
  *
16
  *
31
  ******************************************************************************
17
  ******************************************************************************
32
  */
18
  */
-
 
19
/* USER CODE END Header */
-
 
20
 
33
/* Includes ------------------------------------------------------------------*/
21
/* Includes ------------------------------------------------------------------*/
34
#include "stm32l1xx_hal.h"
-
 
35
#include "stm32l1xx.h"
22
#include "main.h"
36
#include "stm32l1xx_it.h"
23
#include "stm32l1xx_it.h"
-
 
24
/* Private includes ----------------------------------------------------------*/
-
 
25
/* USER CODE BEGIN Includes */
-
 
26
#include "switches.h"
-
 
27
/* USER CODE END Includes */
-
 
28
 
-
 
29
/* Private typedef -----------------------------------------------------------*/
-
 
30
/* USER CODE BEGIN TD */
-
 
31
 
-
 
32
/* USER CODE END TD */
-
 
33
 
-
 
34
/* Private define ------------------------------------------------------------*/
-
 
35
/* USER CODE BEGIN PD */
-
 
36
 
-
 
37
/* USER CODE END PD */
-
 
38
 
-
 
39
/* Private macro -------------------------------------------------------------*/
-
 
40
/* USER CODE BEGIN PM */
37
 
41
 
-
 
42
/* USER CODE END PM */
-
 
43
 
-
 
44
/* Private variables ---------------------------------------------------------*/
-
 
45
/* USER CODE BEGIN PV */
-
 
46
 
-
 
47
/* USER CODE END PV */
-
 
48
 
-
 
49
/* Private function prototypes -----------------------------------------------*/
-
 
50
/* USER CODE BEGIN PFP */
-
 
51
 
-
 
52
/* USER CODE END PFP */
-
 
53
 
-
 
54
/* Private user code ---------------------------------------------------------*/
38
/* USER CODE BEGIN 0 */
55
/* USER CODE BEGIN 0 */
39
#include "switches.h"
-
 
-
 
56
 
40
/* USER CODE END 0 */
57
/* USER CODE END 0 */
41
 
58
 
42
/* External variables --------------------------------------------------------*/
59
/* External variables --------------------------------------------------------*/
43
 
60
 
-
 
61
/* USER CODE BEGIN EV */
-
 
62
 
-
 
63
/* USER CODE END EV */
-
 
64
 
44
/******************************************************************************/
65
/******************************************************************************/
45
/*            Cortex-M3 Processor Interruption and Exception Handlers         */
66
/*           Cortex-M3 Processor Interruption and Exception Handlers          */
46
/******************************************************************************/
67
/******************************************************************************/
47
 
-
 
48
/**
68
/**
49
* @brief This function handles Non maskable interrupt.
69
  * @brief This function handles Non maskable interrupt.
50
*/
70
  */
51
void NMI_Handler(void)
71
void NMI_Handler(void)
52
{
72
{
53
  /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
73
  /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
54
 
74
 
55
  /* USER CODE END NonMaskableInt_IRQn 0 */
75
  /* USER CODE END NonMaskableInt_IRQn 0 */
Line 57... Line 77...
57
 
77
 
58
  /* USER CODE END NonMaskableInt_IRQn 1 */
78
  /* USER CODE END NonMaskableInt_IRQn 1 */
59
}
79
}
60
 
80
 
61
/**
81
/**
62
* @brief This function handles Hard fault interrupt.
82
  * @brief This function handles Hard fault interrupt.
63
*/
83
  */
64
void HardFault_Handler(void)
84
void HardFault_Handler(void)
65
{
85
{
66
  /* USER CODE BEGIN HardFault_IRQn 0 */
86
  /* USER CODE BEGIN HardFault_IRQn 0 */
67
 
87
 
68
  /* USER CODE END HardFault_IRQn 0 */
88
  /* USER CODE END HardFault_IRQn 0 */
69
  while (1)
89
  while (1)
70
  {
90
  {
-
 
91
    /* USER CODE BEGIN W1_HardFault_IRQn 0 */
-
 
92
    /* USER CODE END W1_HardFault_IRQn 0 */
71
  }
93
  }
72
  /* USER CODE BEGIN HardFault_IRQn 1 */
-
 
73
 
-
 
74
  /* USER CODE END HardFault_IRQn 1 */
-
 
75
}
94
}
76
 
95
 
77
/**
96
/**
78
* @brief This function handles Memory management fault.
97
  * @brief This function handles Memory management fault.
79
*/
98
  */
80
void MemManage_Handler(void)
99
void MemManage_Handler(void)
81
{
100
{
82
  /* USER CODE BEGIN MemoryManagement_IRQn 0 */
101
  /* USER CODE BEGIN MemoryManagement_IRQn 0 */
83
 
102
 
84
  /* USER CODE END MemoryManagement_IRQn 0 */
103
  /* USER CODE END MemoryManagement_IRQn 0 */
85
  while (1)
104
  while (1)
86
  {
105
  {
-
 
106
    /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
-
 
107
    /* USER CODE END W1_MemoryManagement_IRQn 0 */
87
  }
108
  }
88
  /* USER CODE BEGIN MemoryManagement_IRQn 1 */
-
 
89
 
-
 
90
  /* USER CODE END MemoryManagement_IRQn 1 */
-
 
91
}
109
}
92
 
110
 
93
/**
111
/**
94
* @brief This function handles Pre-fetch fault, memory access fault.
112
  * @brief This function handles Pre-fetch fault, memory access fault.
95
*/
113
  */
96
void BusFault_Handler(void)
114
void BusFault_Handler(void)
97
{
115
{
98
  /* USER CODE BEGIN BusFault_IRQn 0 */
116
  /* USER CODE BEGIN BusFault_IRQn 0 */
99
 
117
 
100
  /* USER CODE END BusFault_IRQn 0 */
118
  /* USER CODE END BusFault_IRQn 0 */
101
  while (1)
119
  while (1)
102
  {
120
  {
-
 
121
    /* USER CODE BEGIN W1_BusFault_IRQn 0 */
-
 
122
    /* USER CODE END W1_BusFault_IRQn 0 */
103
  }
123
  }
104
  /* USER CODE BEGIN BusFault_IRQn 1 */
-
 
105
 
-
 
106
  /* USER CODE END BusFault_IRQn 1 */
-
 
107
}
124
}
108
 
125
 
109
/**
126
/**
110
* @brief This function handles Undefined instruction or illegal state.
127
  * @brief This function handles Undefined instruction or illegal state.
111
*/
128
  */
112
void UsageFault_Handler(void)
129
void UsageFault_Handler(void)
113
{
130
{
114
  /* USER CODE BEGIN UsageFault_IRQn 0 */
131
  /* USER CODE BEGIN UsageFault_IRQn 0 */
115
 
132
 
116
  /* USER CODE END UsageFault_IRQn 0 */
133
  /* USER CODE END UsageFault_IRQn 0 */
117
  while (1)
134
  while (1)
118
  {
135
  {
-
 
136
    /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
-
 
137
    /* USER CODE END W1_UsageFault_IRQn 0 */
119
  }
138
  }
120
  /* USER CODE BEGIN UsageFault_IRQn 1 */
-
 
121
 
-
 
122
  /* USER CODE END UsageFault_IRQn 1 */
-
 
123
}
139
}
124
 
140
 
125
/**
141
/**
126
* @brief This function handles System service call via SWI instruction.
142
  * @brief This function handles System service call via SWI instruction.
127
*/
143
  */
128
void SVC_Handler(void)
144
void SVC_Handler(void)
129
{
145
{
130
  /* USER CODE BEGIN SVC_IRQn 0 */
146
  /* USER CODE BEGIN SVC_IRQn 0 */
131
 
147
 
132
  /* USER CODE END SVC_IRQn 0 */
148
  /* USER CODE END SVC_IRQn 0 */
Line 134... Line 150...
134
 
150
 
135
  /* USER CODE END SVC_IRQn 1 */
151
  /* USER CODE END SVC_IRQn 1 */
136
}
152
}
137
 
153
 
138
/**
154
/**
139
* @brief This function handles Debug monitor.
155
  * @brief This function handles Debug monitor.
140
*/
156
  */
141
void DebugMon_Handler(void)
157
void DebugMon_Handler(void)
142
{
158
{
143
  /* USER CODE BEGIN DebugMonitor_IRQn 0 */
159
  /* USER CODE BEGIN DebugMonitor_IRQn 0 */
144
 
160
 
145
  /* USER CODE END DebugMonitor_IRQn 0 */
161
  /* USER CODE END DebugMonitor_IRQn 0 */
Line 147... Line 163...
147
 
163
 
148
  /* USER CODE END DebugMonitor_IRQn 1 */
164
  /* USER CODE END DebugMonitor_IRQn 1 */
149
}
165
}
150
 
166
 
151
/**
167
/**
152
* @brief This function handles Pendable request for system service.
168
  * @brief This function handles Pendable request for system service.
153
*/
169
  */
154
void PendSV_Handler(void)
170
void PendSV_Handler(void)
155
{
171
{
156
  /* USER CODE BEGIN PendSV_IRQn 0 */
172
  /* USER CODE BEGIN PendSV_IRQn 0 */
157
 
173
 
158
  /* USER CODE END PendSV_IRQn 0 */
174
  /* USER CODE END PendSV_IRQn 0 */
Line 160... Line 176...
160
 
176
 
161
  /* USER CODE END PendSV_IRQn 1 */
177
  /* USER CODE END PendSV_IRQn 1 */
162
}
178
}
163
 
179
 
164
/**
180
/**
165
* @brief This function handles System tick timer.
181
  * @brief This function handles System tick timer.
166
*/
182
  */
167
void SysTick_Handler(void)
183
void SysTick_Handler(void)
168
{
184
{
169
  /* USER CODE BEGIN SysTick_IRQn 0 */
185
  /* USER CODE BEGIN SysTick_IRQn 0 */
170
 
-
 
-
 
186
  HandleSwitches();
171
  /* USER CODE END SysTick_IRQn 0 */
187
  /* USER CODE END SysTick_IRQn 0 */
172
  HAL_IncTick();
188
  HAL_IncTick();
173
  HAL_SYSTICK_IRQHandler();
-
 
174
  /* USER CODE BEGIN SysTick_IRQn 1 */
189
  /* USER CODE BEGIN SysTick_IRQn 1 */
175
 
190
 
176
  /* USER CODE END SysTick_IRQn 1 */
191
  /* USER CODE END SysTick_IRQn 1 */
177
}
192
}
178
 
193