mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 19:19:00 +08:00
Change uart_read signature
This commit is contained in:
parent
ba8482c707
commit
0b5a00c99a
@ -24,8 +24,10 @@ struct state {
|
||||
.baud = 115200};
|
||||
|
||||
void uart_init(int tx, int rx, int baud);
|
||||
int uart_read(char *buf, size_t len);
|
||||
int uart_read(void *buf, size_t len);
|
||||
void uart_write(const void *buf, size_t len);
|
||||
char *config_read(void);
|
||||
void config_write(struct mg_str config);
|
||||
|
||||
// Let users define their own UART API. If they don't, use a dummy one
|
||||
#if defined(UART_API_IMPLEMENTED)
|
||||
@ -41,7 +43,7 @@ void uart_write(const void *buf, size_t len) {
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
int uart_read(char *buf, size_t len) {
|
||||
int uart_read(void *buf, size_t len) {
|
||||
return read(0, buf, len); // Read from stdin
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user