File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
include/unicore-mx/stm32/f7 Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -313,9 +313,21 @@ LGPL License Terms @ref lgpl_license
313
313
/* EIE: Error interrupt enable */
314
314
#define USART_CR3_EIE (1 << 0)
315
315
316
- /* --- USART_GTPR values --------------------------------------------------- */
317
-
318
-
316
+ /* --- USART_ICR values --------------------------------------------------- */
317
+ #define USART_ICR_PECF (1 << 0)
318
+ #define USART_ICR_FFECF (1 << 1)
319
+ #define USART_ICR_NCF (1 << 2)
320
+ #define USART_ICR_ORECF (1 << 3)
321
+ #define USART_ICR_IDLECF (1 << 4)
322
+ #define USART_ICR_TCCF (1 << 6)
323
+ #define USART_ICR_LBDCF (1 << 8)
324
+ #define USART_ICR_CTSCF (1 << 9)
325
+ #define USART_ICR_RTOCF (1 << 11)
326
+ #define USART_ICR_EOBCF (1 << 12)
327
+ #define USART_ICR_CMCF (1 << 17)
328
+
329
+ void usart_clear_rx_interrupt (uint32_t usart_base );
330
+ void usart_clear_tx_interrupt (uint32_t usart_base );
319
331
320
332
#endif
321
333
Original file line number Diff line number Diff line change @@ -171,4 +171,14 @@ bool usart_get_interrupt_source(uint32_t usart, uint32_t flag)
171
171
return false;
172
172
}
173
173
174
+ void usart_clear_tx_interrupt (uint32_t usart_base )
175
+ {
176
+ USART_ICR (usart_base ) |= USART_ICR_TCCF ;
177
+ }
178
+
179
+ void usart_clear_rx_interrupt (uint32_t usart_base )
180
+ {
181
+ USART_ICR (usart_base ) |= USART_ICR_ORECF ;
182
+ }
183
+
174
184
/**@}*/
You can’t perform that action at this time.
0 commit comments