projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up. Remove module check where is unneeded.
[bertos.git]
/
bertos
/
struct
/
kfile_fifo.c
diff --git
a/bertos/struct/kfile_fifo.c
b/bertos/struct/kfile_fifo.c
index d09ae1e7e7662420190511420223efad298a8369..e35c42c980a292dddbe8f5d8d0975e2258b94ccd 100644
(file)
--- a/
bertos/struct/kfile_fifo.c
+++ b/
bertos/struct/kfile_fifo.c
@@
-32,14
+32,13
@@
*
* \brief KFile interface over a FIFO buffer.
*
*
* \brief KFile interface over a FIFO buffer.
*
- * \version $Id: cfg_adc.h 2348 2009-02-16 13:43:44Z duplo $
* \author Francesco Sacchi <asterix@develer.com>
*/
#include "kfile_fifo.h"
#include "fifobuf.h"
* \author Francesco Sacchi <asterix@develer.com>
*/
#include "kfile_fifo.h"
#include "fifobuf.h"
-#include <
kern
/kfile.h>
+#include <
io
/kfile.h>
#include <string.h>
#include <string.h>
@@
-51,7
+50,7
@@
static size_t kfilefifo_read(struct KFile *_fd, void *_buf, size_t size)
while (size-- && !fifo_isempty_locked(fd->fifo))
*buf++ = fifo_pop_locked(fd->fifo);
while (size-- && !fifo_isempty_locked(fd->fifo))
*buf++ = fifo_pop_locked(fd->fifo);
- return
(void *)buf -
_buf;
+ return
buf - (uint8_t *)
_buf;
}
static size_t kfilefifo_write(struct KFile *_fd, const void *_buf, size_t size)
}
static size_t kfilefifo_write(struct KFile *_fd, const void *_buf, size_t size)
@@
-62,7
+61,7
@@
static size_t kfilefifo_write(struct KFile *_fd, const void *_buf, size_t size)
while (size-- && !fifo_isfull_locked(fd->fifo))
fifo_push_locked(fd->fifo, *buf++);
while (size-- && !fifo_isfull_locked(fd->fifo))
fifo_push_locked(fd->fifo, *buf++);
- return
(void *)buf -
_buf;
+ return
buf - (const uint8_t *)
_buf;
}
void kfilefifo_init(KFileFifo *kf, FIFOBuffer *fifo)
}
void kfilefifo_init(KFileFifo *kf, FIFOBuffer *fifo)