projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
timer_hw_triggered(): Add dummy definition
[bertos.git]
/
drv
/
ser.c
diff --git
a/drv/ser.c
b/drv/ser.c
index 7daac36096c51dcf7c1000fa377f24ad2072ffe8..dbbf9382fbb8eb9c2c42cb92dce0e510c7bb6b6e 100644
(file)
--- a/
drv/ser.c
+++ b/
drv/ser.c
@@
-213,7
+213,7
@@
static size_t ser_read(struct KFile *fd, void *_buf, size_t size)
size_t i = 0;
char *buf = (char *)_buf;
int c;
size_t i = 0;
char *buf = (char *)_buf;
int c;
-
+
while (i < size)
{
if ((c = ser_getchar(fds->ser)) == EOF)
while (i < size)
{
if ((c = ser_getchar(fds->ser)) == EOF)
@@
-345,7
+345,7
@@
void ser_purgeTx(struct KFileSerial *fd)
static int ser_flush(struct KFile *fd)
{
KFileSerial *fds = KFILESERIAL(fd);
static int ser_flush(struct KFile *fd)
{
KFileSerial *fds = KFILESERIAL(fd);
-
+
/*
* Wait until the FIFO becomes empty, and then until the byte currently in
* the hardware register gets shifted out.
/*
* Wait until the FIFO becomes empty, and then until the byte currently in
* the hardware register gets shifted out.
@@
-486,7
+486,7
@@
static size_t spimaster_read(struct KFile *fd, void *buf, size_t size)
static size_t spimaster_write(struct KFile *fd, const void *buf, size_t size)
{
KFileSerial *fd_spi = KFILESERIAL(fd);
static size_t spimaster_write(struct KFile *fd, const void *buf, size_t size)
{
KFileSerial *fd_spi = KFILESERIAL(fd);
-
+
ser_purgeRx(fd_spi);
return ser_write(&fd_spi->fd, buf, size);
ser_purgeRx(fd_spi);
return ser_write(&fd_spi->fd, buf, size);
@@
-510,5
+510,3
@@
void spimaster_init(KFileSerial *fds, unsigned int unit)
fds->fd.read = spimaster_read;
fds->fd.write = spimaster_write;
}
fds->fd.read = spimaster_read;
fds->fd.write = spimaster_write;
}
-
-