File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -114,18 +114,18 @@ class MicroPythonBoard {
114
114
enter_raw_repl ( timeout ) {
115
115
return new Promise ( async ( resolve , reject ) => {
116
116
// ctrl-C twice: interrupt any running program
117
- await this . write_and_drain ( Buffer . from ( `\r\x03\x03` ) )
117
+ await this . serial . write ( Buffer . from ( `\r\x03\x03` ) )
118
118
// flush input
119
119
await this . serial . flush ( )
120
120
// ctrl-A: enter raw REPL
121
- await this . write_and_drain ( Buffer . from ( `\r\x01` ) )
121
+ await this . serial . write ( Buffer . from ( `\r\x01` ) )
122
122
123
123
let data = await this . read_until ( {
124
- ending : Buffer . from ( `raw REPL; CTRL-B to exit\r\n> ` ) ,
124
+ ending : Buffer . from ( `raw REPL; CTRL-B to exit` ) ,
125
125
timeout : timeout
126
126
} )
127
127
128
- if ( data . indexOf ( `raw REPL; CTRL-B to exit\r\n> ` ) !== - 1 ) {
128
+ if ( data . indexOf ( `raw REPL; CTRL-B to exit` ) !== - 1 ) {
129
129
this . in_raw_repl = true
130
130
return resolve ( )
131
131
} else {
@@ -137,7 +137,7 @@ class MicroPythonBoard {
137
137
async exit_raw_repl ( ) {
138
138
if ( this . in_raw_repl ) {
139
139
// ctrl-B: enter friendly REPL
140
- await this . write_and_drain ( Buffer . from ( `\r\x02` ) )
140
+ await this . serial . write ( Buffer . from ( `\r\x02` ) )
141
141
this . in_raw_repl = false
142
142
}
143
143
return Promise . resolve ( )
You can’t perform that action at this time.
0 commit comments