File tree Expand file tree Collapse file tree 6 files changed +14
-23
lines changed Expand file tree Collapse file tree 6 files changed +14
-23
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,4 @@ void mp_hal_set_interrupt_char(int c) {
38
38
mp_interrupt_char = c ;
39
39
}
40
40
41
- void mp_keyboard_interrupt (void ) {
42
- MP_STATE_VM (mp_pending_exception ) = MP_OBJ_FROM_PTR (& MP_STATE_VM (mp_kbd_exception ));
43
- #if MICROPY_ENABLE_SCHEDULER
44
- if (MP_STATE_VM (sched_state ) == MP_SCHED_IDLE ) {
45
- MP_STATE_VM (sched_state ) = MP_SCHED_PENDING ;
46
- }
47
- #endif
48
- }
49
-
50
41
#endif
Original file line number Diff line number Diff line change 28
28
29
29
extern int mp_interrupt_char ;
30
30
void mp_hal_set_interrupt_char (int c );
31
- void mp_keyboard_interrupt (void );
32
31
33
32
#endif // MICROPY_INCLUDED_LIB_UTILS_INTERRUPT_CHAR_H
Original file line number Diff line number Diff line change 26
26
27
27
#include <stdint.h>
28
28
29
- #include "py/mpconfig.h"
30
- #include "py/obj.h"
29
+ #include "py/runtime.h"
31
30
#include "py/mphal.h"
32
31
#include "lib/utils/interrupt_char.h"
33
32
#include "telnet.h"
Original file line number Diff line number Diff line change 24
24
* THE SOFTWARE.
25
25
*/
26
26
27
- #include "py/mpstate .h"
27
+ #include "py/runtime .h"
28
28
#include "py/mphal.h"
29
- #include "lib/utils/interrupt_char.h"
30
29
#include "samd_soc.h"
31
30
#include "tusb.h"
32
31
@@ -46,15 +45,6 @@ void mp_hal_set_interrupt_char(int c) {
46
45
tud_cdc_set_wanted_char (c );
47
46
}
48
47
49
- void mp_keyboard_interrupt (void ) {
50
- MP_STATE_VM (mp_pending_exception ) = MP_OBJ_FROM_PTR (& MP_STATE_VM (mp_kbd_exception ));
51
- #if MICROPY_ENABLE_SCHEDULER
52
- if (MP_STATE_VM (sched_state ) == MP_SCHED_IDLE ) {
53
- MP_STATE_VM (sched_state ) = MP_SCHED_PENDING ;
54
- }
55
- #endif
56
- }
57
-
58
48
#endif
59
49
60
50
void mp_hal_delay_ms (mp_uint_t ms ) {
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ extern const byte mp_binary_op_method_name[];
64
64
void mp_init (void );
65
65
void mp_deinit (void );
66
66
67
+ void mp_keyboard_interrupt (void );
67
68
void mp_handle_pending (bool raise_exc );
68
69
void mp_handle_pending_tail (mp_uint_t atomic_state );
69
70
Original file line number Diff line number Diff line change 28
28
29
29
#include "py/runtime.h"
30
30
31
+ #if MICROPY_KBD_EXCEPTION
32
+ void mp_keyboard_interrupt (void ) {
33
+ MP_STATE_VM (mp_pending_exception ) = MP_OBJ_FROM_PTR (& MP_STATE_VM (mp_kbd_exception ));
34
+ #if MICROPY_ENABLE_SCHEDULER
35
+ if (MP_STATE_VM (sched_state ) == MP_SCHED_IDLE ) {
36
+ MP_STATE_VM (sched_state ) = MP_SCHED_PENDING ;
37
+ }
38
+ #endif
39
+ }
40
+ #endif
41
+
31
42
#if MICROPY_ENABLE_SCHEDULER
32
43
33
44
#define IDX_MASK (i ) ((i) & (MICROPY_SCHEDULER_DEPTH - 1))
You can’t perform that action at this time.
0 commit comments