1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
24
25
26
27
35
36
37
38
39
40
41
42
47
50
51
56
63
64
69
76
77
82
89
90
95
102
103
108
111
112
117
120
121
126
129
130
135
139
140
145
146
147
152
153
154
155
156
157
160
161
166
170
171
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
196
/* ... */
#include "stm32f4xx_it.h"
Includes
extern PCD_HandleTypeDef hpcd;
extern USBD_HandleTypeDef USBD_Device;
extern ADC_HandleTypeDef AdcHandle;
extern uint32_t ADCConvertedValue;
extern uint32_t ADC_Prev_ConvertedValue;
extern uint8_t SendBuffer[2];
Private variables
/* ... */
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)
{
HAL_IncTick();
}{ ... }
...
...
/* ... */
#ifdef USE_USB_FS
void OTG_FS_IRQHandler(void)
#else
void OTG_HS_IRQHandler(void)
#endif
{
HAL_PCD_IRQHandler(&hpcd);
...}
/* ... */
void EXTI15_10_IRQHandler(void)
{
HAL_GPIO_EXTI_IRQHandler(KEY_BUTTON_PIN);
}{ ... }
/* ... */
void ADCx_DMA_IRQHandler(void)
{
HAL_DMA_IRQHandler(AdcHandle.DMA_Handle);
SendBuffer[0] = ADC_REPORT_ID;
if (abs((ADCConvertedValue >> 4) - (ADC_Prev_ConvertedValue >> 4)) > 4)
{
SendBuffer[1] = (uint8_t) (ADCConvertedValue >> 4);
USBD_CUSTOM_HID_SendReport(&USBD_Device, SendBuffer, 2);
ADC_Prev_ConvertedValue = ADCConvertedValue;
}if (abs((ADCConvertedValue >> 4) - (ADC_Prev_ConvertedValue >> 4)) > 4) { ... }
}{ ... }
/* ... */
...Private functions