blob: 5f48f973f6924267af73acd9e6a42f304fc2c1ad (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <unistd.h>
#include "py/mpconfig.h"
#include "src/zephyr_getchar.h"
// Stopgap
extern void printk(const char*, ...);
/*
* Core UART functions to implement for a port
*/
// Receive single character
int mp_hal_stdin_rx_chr(void) {
return zephyr_getchar();
}
// Send string of given length
void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) {
while (len--) {
printk("%c", *str++);
}
}
|