aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/stm32f10x_it.c
blob: 70d3269f58e305dac6150d83c55cfcf0fc9edbb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
void NMIException(void) {
}
void HardFaultException(void) {
  while (1) {
  }
}

void MemManageException(void) {
  while (1) {
  }
}

void BusFaultException(void) {
  while (1) {
  }
}

void UsageFaultException(void) {
  while (1) {
  }
}

#if 0
void DebugMonitor(void) {
}

void SVCHandler(void) {
}

void PendSVC(void) {
}

void WWDG_IRQHandler(void) {
}

void PVD_IRQHandler(void) {
}

void TAMPER_IRQHandler(void) {
}

void RTC_IRQHandler(void) {
}

void FLASH_IRQHandler(void) {
}

void RCC_IRQHandler(void) {
}

void DMA1_Channel1_IRQHandler(void) {
}

void DMA1_Channel2_IRQHandler(void) {
}

void DMA1_Channel3_IRQHandler(void) {
}

void DMA1_Channel4_IRQHandler(void) {
}

void DMA1_Channel5_IRQHandler(void) {
}

void DMA1_Channel6_IRQHandler(void) {
}

void DMA1_Channel7_IRQHandler(void) {
}

void ADC1_2_IRQHandler(void) {
}

void USB_HP_CAN_TX_IRQHandler(void) {
}

void USB_LP_CAN_RX0_IRQHandler(void) {
}

void CAN_RX1_IRQHandler(void) {
}

void CAN_SCE_IRQHandler(void) {
}

void TIM1_BRK_IRQHandler(void) {
}

void TIM1_UP_IRQHandler(void) {
    while(1) {
    }
}

void TIM1_TRG_COM_IRQHandler(void) {
}

void TIM1_CC_IRQHandler(void) {
    while(1)
        ;
}

void TIM2_IRQHandler(void) {
}

void TIM3_IRQHandler(void) {
}

void TIM4_IRQHandler(void) {
}

void I2C1_EV_IRQHandler(void) {
}

void I2C1_ER_IRQHandler(void) {
}

void I2C2_EV_IRQHandler(void) {
}

void I2C2_ER_IRQHandler(void) {
}

void SPI1_IRQHandler(void) {
}

void SPI2_IRQHandler(void) {
}

void USART1_IRQHandler(void) {
#if 0
  if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
  {
    /* Read one byte from the receive data register */
    RxBuffer[RxCounter++] = (USART_ReceiveData(USART1) & 0x7F);         

    if(RxCounter == NbrOfDataToRead)
    {
      /* Disable the USART Receive interrupt */
      USART_ITConfig(USART1, USART_IT_RXNE, DISABLE);
    }
  }

  if(USART_GetITStatus(USART1, USART_IT_TXE) != RESET)
  {   
    /* Write one byte to the transmit data register */
    USART_SendData(USART1, TxBuffer[TxCounter++]);                    

    if(TxCounter == NbrOfDataToTransfer)
    {
      /* Disable the USART1 Transmit interrupt */
      USART_ITConfig(USART1, USART_IT_TXE, DISABLE);
    }    
  }
#endif
}

void USART2_IRQHandler(void) {
#if 0
  if(USART_GetITStatus(USART2, USART_IT_RXNE) != RESET)
  {
      /* Echo the character back  */
      RxBuffer[0] = (USART_ReceiveData(USART2) & 0x7F);         
      USART_SendData(USART2, RxBuffer[0]);
  //  /* Read one byte from the receive data register */
  //  RxBuffer[RxCounter++] = (USART_ReceiveData(USART2) & 0x7F);         

  //  if(RxCounter == NbrOfDataToRead)
  //  {
  //    /* Disable the USART Receive interrupt */
  //    USART_ITConfig(USART2, USART_IT_RXNE, DISABLE);
  //  }
  }

#endif
 
#if 0
  if(USART_GetITStatus(USART2, USART_IT_TXE) != RESET)
  {   
    /* Write one byte to the transmit data register */
    USART_SendData(USART2, 'Y');                    
    TxCounter++;
//    USART_SendData(USART2, TxBuffer[TxCounter++]);                    

    if(TxCounter == NbrOfDataToTransfer) {
      /* Disable the USART1 Transmit interrupt */
      USART_ITConfig(USART2, USART_IT_TXE, DISABLE);
    }
  }
#endif
}

void USART3_IRQHandler(void) {
}

void RTCAlarm_IRQHandler(void) {
}

void USBWakeUp_IRQHandler(void) {
}

void TIM8_BRK_IRQHandler(void) {
}

void TIM8_UP_IRQHandler(void) {
}

void TIM8_TRG_COM_IRQHandler(void) {
}

void TIM8_CC_IRQHandler(void) {
}

void ADC3_IRQHandler(void) {
}

void FSMC_IRQHandler(void) {
}

void SDIO_IRQHandler(void) {
}

void TIM5_IRQHandler(void) {
}

void SPI3_IRQHandler(void) {
}

void UART4_IRQHandler(void) {
}

void UART5_IRQHandler(void) {
}

void TIM6_IRQHandler(void) {
}

void TIM7_IRQHandler(void) {
}

void DMA2_Channel1_IRQHandler(void) {
}

void DMA2_Channel2_IRQHandler(void) {
}

void DMA2_Channel3_IRQHandler(void) {
}

void DMA2_Channel4_5_IRQHandler(void) {
}
#endif