Fixes warning.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 28 Jun 2010 10:51:10 +0000 (10:51 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 28 Jun 2010 10:51:10 +0000 (10:51 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3952 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/io/kblock.h
bertos/io/kblock_ram.c
bertos/io/kblock_ram.h

index b486fa6d3250891b184584d008434b6bcd5508d9..59d19bae8026df4b53eb345d2036f095799aeef5 100644 (file)
@@ -430,4 +430,6 @@ INLINE int kblock_close(struct KBlock *b)
        return b->vt->close(b);
 }
 
+void *kblock_unsupportedMap(struct KBlock *b, UNUSED_ARG(size_t, offset), UNUSED_ARG(size_t, size));
+
 #endif /* IO_KBLOCK_H */
index d5ffc9078441cb5d0963e4a49b53ed766a8bff12..6707561dafe20b7b537c63e315ca67c9c90dcb2e 100644 (file)
 #include <string.h>
 
 
-int kblockram_load(KBlock *b, block_idx_t index)
+static int kblockram_load(KBlock *b, block_idx_t index)
 {
        KBlockRam *r = KBLOCKRAM_CAST(b);
        memcpy(r->b.priv.pagebuf, r->membuf + index * r->b.blk_size, r->b.blk_size);
        return 0;
 }
 
-int kblockram_store(struct KBlock *b, block_idx_t index)
+static int kblockram_store(struct KBlock *b, block_idx_t index)
 {
        KBlockRam *r = KBLOCKRAM_CAST(b);
        memcpy(r->membuf + index * r->b.blk_size, r->b.priv.pagebuf, r->b.blk_size);
        return 0;
 }
 
-size_t kblockram_readBuf(struct KBlock *b, void *buf, size_t offset, size_t size)
+static size_t kblockram_readBuf(struct KBlock *b, void *buf, size_t offset, size_t size)
 {
        KBlockRam *r = KBLOCKRAM_CAST(b);
        memcpy(buf, (uint8_t *)r->b.priv.pagebuf + offset, size);
        return size;
 }
 
-size_t kblockram_writeBuf(struct KBlock *b, const void *buf, size_t offset, size_t size)
+static size_t kblockram_writeBuf(struct KBlock *b, const void *buf, size_t offset, size_t size)
 {
        KBlockRam *r = KBLOCKRAM_CAST(b);
        memcpy((uint8_t *)r->b.priv.pagebuf + offset, buf, size);
        return size;
 }
 
-void * kblockram_map(struct KBlock *b, size_t offset, UNUSED_ARG(size_t, size))
+static void * kblockram_map(struct KBlock *b, size_t offset, UNUSED_ARG(size_t, size))
 {
        return (uint8_t *)b->priv.pagebuf + offset;
 }
 
 
-int kblockram_unmap(UNUSED_ARG(struct KBlock *, b), UNUSED_ARG(size_t, offset), UNUSED_ARG(size_t, size))
+static int kblockram_unmap(UNUSED_ARG(struct KBlock *, b), UNUSED_ARG(size_t, offset), UNUSED_ARG(size_t, size))
 {
        return 0;
 }
 
-int kblockram_error(struct KBlock *b)
+static int kblockram_error(struct KBlock *b)
 {
        return b->priv.flags;
 }
 
-int kblockram_dummy(UNUSED_ARG(struct KBlock *,b))
+static int kblockram_dummy(UNUSED_ARG(struct KBlock *,b))
 {
        return 0;
 }
 
-static const KBlockVTable kblockram_vt =
+static KBlockVTable kblockram_vt =
 {
        .readBuf = kblockram_readBuf,
        .writeBuf = kblockram_writeBuf,
index b003a601ba662c10da85bf23d599c55a778e88f9..1ae8933bc5678c386592febbe606e60303188c87 100644 (file)
@@ -35,6 +35,8 @@
  * \brief KBlock interface
  */
 
+#ifndef KBLOCK_RAM_H
+#define KBLOCK_RAM_H
 
 #include "kblock.h"
 
@@ -54,3 +56,6 @@ INLINE KBlockRam *KBLOCKRAM_CAST(KBlock *b)
        return (KBlockRam *)b;
 }
 
+void kblockram_init(KBlockRam *ram, void *buf, size_t size, size_t block_size);
+
+#endif /* KBLOCK_RAM_H */