Skip to content

Commit 9f4b537

Browse files
committed
Use ets_printf since it also exists on ESP8266.
1 parent a3b46b7 commit 9f4b537

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/sys/unix/stdio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ mod xtensa {
99
use super::*;
1010

1111
extern "C" {
12-
fn ets_write_char_uart(c: libc::c_char);
12+
fn ets_printf(fmt: *const libc::c_char, ...) -> libc::c_int;
1313
}
1414

1515
pub fn write(buf: &[u8]) -> io::Result<usize> {
1616
for &b in buf.iter() {
17-
unsafe { ets_write_char_uart(b as libc::c_char) }
17+
unsafe { ets_printf(b"%c\0" as *const u8 as *const libc::c_char, b as libc::c_int) };
1818
}
1919

2020
Ok(buf.len())

0 commit comments

Comments
 (0)