serial: Fix serial driver

The serial driver was having issues reading data.  This commit makes
the serial driver more robust.

Signed-off-by: Sean Cross <xobs@kosagi.com>
This commit is contained in:
Sean Cross 2015-02-04 21:05:03 +08:00
parent 1602ba550c
commit 70140aa665
2 changed files with 63 additions and 28 deletions

View file

@ -6,11 +6,12 @@
int serial_putc(uint8_t c);
int serial_puts(const void *s);
void serial_puth(uint32_t hex, int digits); /* Put hex */
int serial_read(void *data, int bytes);
void serial_write(const void *d, int bytes);
uint8_t serial_getc(void);
int serial_print_hex(const void *bfr, int count);
int serial_read(void *data, int bytes);
void serial_init(void);
int serial_print_hex(const void *bfr, int count);
#endif /* __SERIAL_H__ */