1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
32
33
34
35
36
37
38
39
40
41
42
43
44
49
52
53
58
65
66
71
78
79
84
91
92
97
104
105
110
113
114
119
122
123
128
131
132
137
140
141
146
147
148
153
164
165
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
199
200
205
206
207
208
209
210
211
212
213
214
215
216
221
226
227
230
231
/* ... */
#include "stm32f4xx_it.h"
/* ... */
/* ... */
Includes
/* ... */
void NMI_Handler(void)
{
}{ ... }
/* ... */
void HardFault_Handler(void)
{
while (1)
{
}while (1) { ... }
}{ ... }
/* ... */
void MemManage_Handler(void)
{
while (1)
{
}while (1) { ... }
}{ ... }
/* ... */
void BusFault_Handler(void)
{
while (1)
{
}while (1) { ... }
}{ ... }
/* ... */
void UsageFault_Handler(void)
{
while (1)
{
}while (1) { ... }
}{ ... }
/* ... */
void SVC_Handler(void)
{
}{ ... }
/* ... */
void DebugMon_Handler(void)
{
}{ ... }
/* ... */
void PendSV_Handler(void)
{
}{ ... }
/* ... */
void SysTick_Handler(void)
{
}{ ... }
...
...
/* ... */
void USER_BUTTON_IRQHANDLER(void)
{
if(LL_EXTI_IsActiveFlag_0_31(USER_BUTTON_EXTI_LINE) != RESET)
{
LL_EXTI_ClearFlag_0_31(USER_BUTTON_EXTI_LINE);
UserButton_Callback();
}if (LL_EXTI_IsActiveFlag_0_31(USER_BUTTON_EXTI_LINE) != RESET) { ... }
}{ ... }
/* ... */
void I2C1_EV_IRQHandler(void)
{
if(LL_I2C_IsActiveFlag_ADDR(I2C1))
{
if(LL_I2C_GetTransferDirection(I2C1) == LL_I2C_DIRECTION_READ)
{
LL_I2C_EnableIT_BUF(I2C1);
LL_I2C_ClearFlag_ADDR(I2C1);
}if (LL_I2C_GetTransferDirection(I2C1) == LL_I2C_DIRECTION_READ) { ... }
else
{
LL_I2C_ClearFlag_ADDR(I2C1);
Error_Callback();
}else { ... }
}if (LL_I2C_IsActiveFlag_ADDR(I2C1)) { ... }
else if(LL_I2C_IsActiveFlag_RXNE(I2C1))
{
Slave_Reception_Callback();
}else if (LL_I2C_IsActiveFlag_RXNE(I2C1)) { ... }
else if(LL_I2C_IsActiveFlag_BTF(I2C1))
{
Slave_Reception_Callback();
}else if (LL_I2C_IsActiveFlag_BTF(I2C1)) { ... }
else if(LL_I2C_IsActiveFlag_STOP(I2C1))
{
LL_I2C_ClearFlag_STOP(I2C1);
Slave_Complete_Callback();
}else if (LL_I2C_IsActiveFlag_STOP(I2C1)) { ... }
}{ ... }
/* ... */
void I2C1_ER_IRQHandler(void)
{
Error_Callback();
}{ ... }
/* ... */
/* ... */