File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -729,17 +729,17 @@ void uart_irq_handler(mp_uint_t uart_id) {
729
729
int data = self -> uartx -> DR ; // clears UART_FLAG_RXNE
730
730
#endif
731
731
data &= self -> char_mask ;
732
- // Handle interrupt coming in on a UART REPL
733
732
if (self -> attached_to_repl && data == mp_interrupt_char ) {
733
+ // Handle interrupt coming in on a UART REPL
734
734
pendsv_kbd_intr ();
735
- return ;
736
- }
737
- if (self -> char_width == CHAR_WIDTH_9BIT ) {
738
- ((uint16_t * )self -> read_buf )[self -> read_buf_head ] = data ;
739
735
} else {
740
- self -> read_buf [self -> read_buf_head ] = data ;
736
+ if (self -> char_width == CHAR_WIDTH_9BIT ) {
737
+ ((uint16_t * )self -> read_buf )[self -> read_buf_head ] = data ;
738
+ } else {
739
+ self -> read_buf [self -> read_buf_head ] = data ;
740
+ }
741
+ self -> read_buf_head = next_head ;
741
742
}
742
- self -> read_buf_head = next_head ;
743
743
} else { // No room: leave char in buf, disable interrupt
744
744
UART_RXNE_IT_DIS (self -> uartx );
745
745
}
You can’t perform that action at this time.
0 commit comments